Displaying 20 results from an estimated 30000 matches similar to: "write.csv causes system() and ? to stop working"
2010 Jun 01
2
New behavior of 'write.csv' append argument?
Dear R users,
I have recently begun to reuse some functions I made several months ago. The
scripts write to a .csv file using the 'write.csv' function with the append
option set to TRUE. This used to work fine, albeit with the warning
"appending column names to file". I upgraded to R version 2.11.0 on OSX
10.5.8 and 'write.csv' will no longer append any files - I get the
2008 Apr 08
1
Combining many csv files into one and adding a column with an id of each csv file read
Dear R experts,
I have been looking into the help-pages and old
questions from the R-Help site, but the options
offered there don't seem to work in my case.
First of all, I am working on Windows XP, using R
version 2.6.2.
I am attaching two csv files as an example of how
the data I am traying to put together is delivered to
us. On the first row of every csv file is the name of
the
2008 Aug 08
1
write.csv writing the "index"
I have a simple command to export a data.frame:
write.csv(output, "TotalPredicted2008.dat")
The structure of the data.frame can be seen with:
> head(output)
DayOfYear Sales
1 1 1429
2 2 3952
3 3 3049
4 4 2844
5 5 2219
6 6 2340
But it seems that the index is getting written out to the file. The first few lines look like:
2007 Sep 28
3
[ win32utils-Bugs-14298 ] windows-api 0.2.0/windows-pr 0.7.1 causes segfault with require of win32/file
Bugs item #14298, was opened at 2007-09-28 10:23
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=411&aid=14298&group_id=85
Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Lars Olsson (lasso)
Assigned to: Nobody (None)
Summary: windows-api 0.2.0/windows-pr 0.7.1 causes segfault with require of win32/file
Initial Comment:
2008 Oct 09
1
Write multiple objects / data frames into a single .csv -- write.csv
Hello,
Is there a way to put multiple data.frames or objects into a single .csv ?
I know I can use sink() to do this for a text file. Is there way to do it
for a .csv?
e.g. for sink()
sink("c5.k.s.p.92.LN.sl.vs.mean.txt")
symnum(c5.k.92.LN.sl.vs.mean)
symnum(c5.s.92.LN.sl.vs.mean)
symnum(c5.p.92.LN.sl.vs.mean)
sink()
Could I put these all into a single .csv, in a similar format to
2010 Jan 21
1
How to write '"' to a csv with the default setting of write.csv?
Please see the following example. I can not write '"' to a csv file
successfully. Could somebody let me if it is possible to write '"' to
a csv file with the default setting of write.csv?
my_home$ Rscript main_quote.R
> x=rbind(
+ "\"A\""
+ , "\"B\""
+ )
> x
[,1]
[1,] "\"A\""
[2,]
2011 Nov 11
1
Have write.csv write csv without observation number
Hello all,
Have a little annoying issue with wreite.csv. It always writes out
observation number. Is there a way to avoid this. Thanks,
DL
--
View this message in context: http://r.789695.n4.nabble.com/Have-write-csv-write-csv-without-observation-number-tp4030672p4030672.html
Sent from the R help mailing list archive at Nabble.com.
2007 Oct 30
2
How to switch off accepting the shortcut of column names
Dear R-users,
currently I am working with the R version 2.4.1.
I realized it has a feature, which might be wonderful (as so many things in
R), but in this case might be a bit dangerous as well. It seems that columns
of a data frame can be called just by indicating the first letter of the
name of the column.
For example:
first_item <- seq(1,10)
second_item <- seq(11,20)
dat <-
2011 Jan 13
1
Unexpected behaviour of write.csv - read.csv
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi
Assuming the following:
> x <- data.frame(a=1:10, b=runif(10))
> str(x)
'data.frame': 10 obs. of 2 variables:
$ a: int 1 2 3 4 5 6 7 8 9 10
$ b: num 0.692 0.325 0.634 0.16 0.873 ...
> write.csv(x, "x.csv")
> x2 <- read.csv("x.csv")
> str(x2)
'data.frame': 10 obs. of 3 variables:
$ X:
2008 Jun 25
1
tiff() causes R to crash on WinXP (PR#11804)
Full_Name: Gustaf Rydevik
Version: 2.7.1
OS: Win XP professional
Submission from: (NULL) (130.237.97.254)
The following lines of code crash R 2.7.1 (=cause R to show "The R gui has
encountered a problem and needs to close"....). Replicated on two WinXp
professional machines, as well as by Uwe Ligges.
> sessionInfo()
R version 2.7.1 (2008-06-23)
i386-pc-mingw32
locale:
2012 Sep 26
1
Ask for help - how to change WHIRR.117.csv to WHIRR_117.csv
Hi,
I have a script below.
dat <- read.table(file="pt.csv", header=T, sep=",", row.names=1,
col.names=1)
dat
for(which_col in seq_len(ncol(dat)))
{
subset_data <- dat[,which_col:ncol(dat)]
file_name <- sprintf('%s.csv', colnames(dat)[which_col])
write.csv(subset_data, file_name)
message(sprintf('Saving %s', file_name))
}
2008 Mar 03
0
Attempting to connect to an Empress RDBMS via RODBC 1.2-3 causes R 2.6.2.pat to segfault
Hi
I've experienced some unpleasant behaviour while attempting to connect to an Empress 8.6.2 RDBMS via RODBC 1.2-3 and a freshly minted R 2.6.2.pat on a SLED linux system where a call to odbcConnect() to initiate the odbc connection causes R 2.6.2.pat to segfault.
The odbcConnect call is
CHANNEL <- odbcConnect("myEmpressDB", uid="myusername",
2009 May 04
1
how to remove ( ) ? when using write.csv(chron.object)
Hello all,
I don' like to have ( ) around my datetime, when send the csv file to somebody.
How to remove it?
>library(chron)
>mydate <- c("2009-05-03","2009-06-07")
>mytime <- c("10:30:00","10:20:00")
>mydatetime <- chron(dates=mydate,times=mytime,format=c("y-m-d","h:m:s"))
>write.csv(mydatetime)
2020 Oct 20
0
write.csv covert Åland to <c5>land
?file.write()
look for fileEncoding?
el
On 20/10/2020 11:13, Jinsong Zhao wrote:
> Hi there,
>
> I tried to export the names of country to a csv file with write.csv(). In the resulted file, ?land was coverted to <c5>land. Is there any way could prevent this happening? Thanks!
>
>> abc
> [1] "?land"
>> write.table(abc, file = "")
>
2020 Oct 20
2
write.csv covert Åland to <c5>land
On 2020/10/20 17:23, Dr Eberhard W Lisse wrote:
> ?file.write()
>
> look for fileEncoding?
>
> el
>
There is no file.write(). I have tried fileEncoding = "utf8" and
"latin1" in write.csv(). However, it does not have effect. The output is
is <U+00C5>land or <c5>land.
Best,
Jinsong
> On 20/10/2020 11:13, Jinsong Zhao wrote:
>> Hi
2020 Oct 20
0
write.csv covert Åland to <c5>land
Apologies,
I meant
?write.table()
el
On 20/10/2020 12:38, Jinsong Zhao wrote:
> On 2020/10/20 17:23, Dr Eberhard W Lisse wrote:
>> ?file.write()
>>
>> look for fileEncoding?
>>
>> el
>>
>
> There is no file.write(). I have tried fileEncoding = "utf8" and
> "latin1" in write.csv(). However, it does not have effect. The
2005 Jul 07
1
write.csv (PR#7992)
The write.csv() function is currently implemented as
function (..., col.names=NA, sep=",", qmethod="double")
{
write.table(..., col.names=NA, sep=",", qmethod="double")
}
Surely, it should be
function (..., col.names=NA, sep=",", qmethod="double")
{
write.table(..., col.names=col.names, sep=sep,
2008 Oct 24
1
write.csv(..., col.names = FALSE) (PR#13202)
Full_Name: Stefan Albrecht
Version: 2.7.2 (and 2.8.0)
OS: Windows NT
Submission from: (NULL) (194.127.8.17)
Dear R Debug-Team,
in write.csv() it is not possible to set both
row.names = FALSE, col.names = FALSE
since the col.names = FALSE gets overwritten:
> write.csv
function (...)
{
Call <- match.call(expand.dots = TRUE)
for (argname in c("col.names", "sep",
2017 Jul 04
0
write.csv
On 04/07/2017 5:40 AM, Lipatz Jean-Luc wrote:
> Hi all,
>
> I am currently studying how to generalize the usage of R in my statistical institute and I encountered a problem that I cannot declare on bugzilla (cannot understand why).
Bugzilla was badly abused by spammers last year, so you need to have
your account created manually by one of the admins to post there. Write
to me
2018 Mar 14
0
truncation/rounding bug with write.csv
What OS are you on? On Ubuntu 17.10 with R 3.4.3 all seems well (see
below for your example, I just added a setwd()).
[ That said, I long held a (apparently minority) view that csv is for all
intends and purposes a less-than-ideal format. If you have that much data,
you do generally not want to serialize it back and forth as that is slow, and
may drop precision. The rds format is great for R