Hi everybody,
I am sorry if this is a silly question (I have tried to search it at
http://tolstoy.newcastle.edu.au/R/ but I get a 404 page).
I have a script writing some data.frames to csv files.
I write the csv files using the write.csv function and the option
row.names=TRUE.
Everything works
The argument is col.names, not colnames.
Best,
Ista
On Mar 19, 2014 6:14 AM, Luca Cerone luca.cer...@gmail.com wrote:
Hi everybody,
I am sorry if this is a silly question (I have tried to search it at
http://tolstoy.newcastle.edu.au/R/ but I get a 404 page).
I have a script writing some
Thanks Ista,
sorry it was a typo in my email, but in the code I have the right option.
On Wed, Mar 19, 2014 at 11:58 AM, Ista Zahn istaz...@gmail.com wrote:
The argument is col.names, not colnames.
Best,
Ista
On Mar 19, 2014 6:14 AM, Luca Cerone luca.cer...@gmail.com wrote:
Hi everybody,
Thanks Duncan,
I knew that, I wanted to know if there was some way not involving
having to recreate the df.
It is not a big issue in this case (they are not very big), but it
might be problematic for big data frames.
Thanks for advice on using col.names=NA.
Cheers,
Luca
Luca Cerone
Tel: +34 692
Hello,
write.csv(df, row.names=TRUE, col.names=c(ID, colnames(df)))
,a,b
A,1,3
B,2,4
C,3,5
Warning message:
In write.csv(df, row.names = TRUE, col.names = c(ID, colnames(df))) :
attempt to set 'col.names' ignored
This gives a warning, not an error message. I've also tried setting
col.names
5 matches
Mail list logo