I might add that ifelse() is a vectorized function - is the operation you're
trying to perform vectorized?
D.
On Fri, Sep 17, 2010 at 10:21 AM, Dennis Murphy wrote:
> Hi:
>
> The first argument of ifelse is a logical statement that must evaluate to
> either TRUE or FALSE. I'm guessing that you'
Hi:
The first argument of ifelse is a logical statement that must evaluate to
either TRUE or FALSE. I'm guessing that you're using the append function
here, which is not a logical statement. Perhaps it would help if you
described what you wanted to do with a reproducible example to illustrate
the
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of lord12
> Sent: Friday, September 17, 2010 9:02 AM
> To: r-help@r-project.org
> Subject: Re: [R] convert to csv file
>
>
> I get an error messa
More context would be useful, but my first guess is that you are
running into problems because both file and append are functions.
If you didn't explicitly set them to something else, R is using the
function.
What happens if you instead use:
filename <- "myfile.csv"
toappend <- FALSE
file(filename
I get an error message:
Error in file(file, ifelse(append, "a", "w")) : invalid 'open' argument
How do I resolve this?
--
View this message in context:
http://r.789695.n4.nabble.com/convert-to-csv-file-tp2543232p2544070.html
Sent from the R help mailing list archive at Nabble.com.
___
On Sep 16, 2010, at 10:55 PM, lord12 wrote:
In order to use the extension csv, is the syntax:
write.table(table_list, file= paste("file", x, sep = "").csv, sep =
",") ?
Nope. You cannot just tack strings on the end of function calls. Try:
write.table(table_list, file= paste("file", x, ".
help@r-project.org
Subject: Re: [R] convert to csv file
In order to use the extension csv, is the syntax:
write.table(table_list, file= paste("file", x, sep = "").csv, sep = ",") ?
Also I pretty much create a table by
doing:
table_list= cbind(c1,c2,c3,c4) where
In order to use the extension csv, is the syntax:
write.table(table_list, file= paste("file", x, sep = "").csv, sep = ",") ?
Also I pretty much create a table by
doing:
table_list= cbind(c1,c2,c3,c4) where c1...c4 are vectors.
--
View this message in context:
http://r.789695.n4.nabble.com
On Sep 16, 2010, at 10:22 PM, lord12 wrote:
I want to open the file in excel and I want the columns in my table
to be
lined up with the columns in excel.
Generally one would use an extension of .csv in that instance, and you
may need to move the column headers over one cell because the
On Sep 16, 2010, at 10:17 PM, lord12 wrote:
write.table(table_list, file= paste("file", x, sep = ""), sep = ",")
My output is still a file object.
Wasn't that the point?
--
View this message in context:
http://r.789695.n4.nabble.com/convert-to-csv-file-tp2543232p2543251.html
Sent from
write.table(table_list, file= paste("file", x, sep = ""), sep = ",")
My output is still a file object.
--
View this message in context:
http://r.789695.n4.nabble.com/convert-to-csv-file-tp2543232p2543251.html
Sent from the R help mailing list archive at Nabble.com.
__
I want to open the file in excel and I want the columns in my table to be
lined up with the columns in excel.
--
View this message in context:
http://r.789695.n4.nabble.com/convert-to-csv-file-tp2543232p2543256.html
Sent from the R help mailing list archive at Nabble.com.
__
On Sep 16, 2010, at 9:49 PM, lord12 wrote:
I have a command:
write.table(table_list, file= paste("file", x, sep = "")) where x is
the
file name. How do I convert this file into a csv file in this
statement?
By using a sep argument of "," for write.table or using the pre-
packaged write.
13 matches
Mail list logo