Re: [R] write.csv / string extraction and field limits

2007-09-10 Thread Xavier Abulker
This example works fine: test-matrix(c(1,2,'VOICIUNPETITTES',3),ncol=2,nrow=2) write.csv(test,file='C:/xavier/test.csv') Could you provide the same small example when it doesn't work? kwaj wrote: Hello, I have a peculiar problem which I am hoping I can get help

[R] write.csv / string extraction and field limits

2007-09-06 Thread kwaj
Hello, I have a peculiar problem which I am hoping I can get help on. I am using the write.csv command to write a matrix structure to a file, which I later read in excel. The command works quite well for most strings and numerical values in the matrix structure. However, I have found that

[R] write.csv

2007-07-30 Thread Dong GUO 郭东
Hi, I want to save an array(say, array[6,7,8]) write a cvs file. How can I do that??? can I write in one file? if I could not write in one file, i want to use a loop to save in different files (in the array[6,7,8], should be 8 csv files), such as the filename structure should be: file =filename

Re: [R] write.csv

2007-07-30 Thread Dong GUO 郭东
Thanks Ted for the help. I will try and see if my case will get the expected results. Dong On 7/30/07, Ted Harding [EMAIL PROTECTED] wrote: On 29-Jul-07 17:41:58, Dong GUO ¹ù¶« wrote: Hi, I want to save an array(say, array[6,7,8]) write a cvs file. How can I do that??? can I write in

Re: [R] write.csv

2007-07-30 Thread Dong GUO 郭东
the dim of my results is (26,31,8) -(years, regions and variables). so, if i save each (years, regions) in 8 csv files, later, I could connect the (26,31) to dbf file in ArcGIS to show in a map. This is what I intend to do. I dont know a better way to do it directly in R... On 7/31/07, jim

Re: [R] write.csv

2007-07-30 Thread jim holtman
Then you can just write a 'for' loop to write out each submatrix: for (i in 1:dim(x)[3]){ write.csv(x[,,i], paste(x, i, .csv, sep=)) } On 7/30/07, Dong GUO 郭东 [EMAIL PROTECTED] wrote: the dim of my results is (26,31,8) -(years, regions and variables). so, if i save each (years, regions)

Re: [R] write.csv

2007-07-30 Thread Dong GUO 郭东
Many thanks, Jim... On 7/31/07, jim holtman [EMAIL PROTECTED] wrote: Then you can just write a 'for' loop to write out each submatrix: for (i in 1:dim(x)[3]){ write.csv(x[,,i], paste(x, i, .csv, sep=)) } On 7/30/07, Dong GUO ¹ù¶« [EMAIL PROTECTED] wrote: the dim of my results is

Re: [R] write.csv

2007-07-30 Thread Ted Harding
On 29-Jul-07 17:41:58, Dong GUO ¹ù¶« wrote: Hi, I want to save an array(say, array[6,7,8]) write a cvs file. How can I do that??? can I write in one file? if I could not write in one file, i want to use a loop to save in different files (in the array[6,7,8], should be 8 csv files), such

Re: [R] write.csv feature/bug with pipe

2007-03-25 Thread Prof Brian Ripley
This is simply user error: the column names _are_ written to the pipe. Because the connection was not open, the connection is opened to write the column names, closed, opened to write the data and then closed. In any case, you should call close() on connections you create to avoid leaking

[R] write.csv feature/bug with pipe

2007-03-11 Thread ivo welch
gentoo linux, version 2.4.1: d= as.data.frame(matrix(1:20, 4, 5)) d V1 V2 V3 V4 V5 1 1 5 9 13 17 2 2 6 10 14 18 3 3 7 11 15 19 4 4 8 12 16 20 write.csv(d, file=d1.csv); write.csv(d, file=pipe(cat d2.csv)) write.csv(d, file=pipe(gzip -c d3.csv.gz), col.names=T) Warning message:

[R] write.csv + appending output (FILE I/O)

2006-05-18 Thread Sachin J
Hi, How can I write the output to an excel (csv) file without printing row names (i.e without breaks). Here is my code: library( fn - function() { q - c(1,2,3) write.csv(q,C:/Temp/op.xls, append = TRUE, row.names = FALSE,quote = FALSE) } # Function Call for(i in 1:3)

Re: [R] write.csv + appending output (FILE I/O)

2006-05-18 Thread Jason Barnhart
: Thursday, May 18, 2006 7:36 AM Subject: [R] write.csv + appending output (FILE I/O) Hi, How can I write the output to an excel (csv) file without printing row names (i.e without breaks). Here is my code: library( fn - function() { q - c(1,2,3) write.csv(q,C:/Temp/op.xls, append