Re: [R] difference between write.csv(...) and write.table(..., sep=, )

2015-08-16 Thread Berend Hasselman
On 16-08-2015, at 16:38, Jinsong Zhao jsz...@yeah.net wrote: Hi there, I notice that write.csv is a wrap of write.table. However, I can't get the same results using both functions. Here is a reproducible example: x - matrix(1:6, nrow =2) rownames(x) - letters[1:2] colnames(x) -

Re: [R] difference between write.csv(...) and write.table(..., sep=, )

2015-08-16 Thread Marc Schwartz
On Aug 16, 2015, at 9:38 AM, Jinsong Zhao jsz...@yeah.net wrote: Hi there, I notice that write.csv is a wrap of write.table. However, I can't get the same results using both functions. Here is a reproducible example: x - matrix(1:6, nrow =2) rownames(x) - letters[1:2] colnames(x)

Re: [R] difference between write.csv(...) and write.table(..., sep=, )

2015-08-16 Thread Michael Dewey
I think that if you do ?write.csv and then page down to the section entitled CSV files the mystery will be solved for you in the first few paragraphs. On 16/08/2015 15:38, Jinsong Zhao wrote: Hi there, I notice that write.csv is a wrap of write.table. However, I can't get the same results

[R] difference between write.csv(...) and write.table(..., sep=, )

2015-08-16 Thread Jinsong Zhao
Hi there, I notice that write.csv is a wrap of write.table. However, I can't get the same results using both functions. Here is a reproducible example: x - matrix(1:6, nrow =2) rownames(x) - letters[1:2] colnames(x) - LETTERS[1:3] write.csv(x, ) ,A,B,C a,1,3,5 b,2,4,6 write.table(x, ,