In R.2.9.2 I get the following error message if setting col.names=FALSE: > write.csv(x, '', col.names=FALSE) "","a","b" "1",1,1 "2",2,2 "3",3,3 "4",4,4 "5",5,5 "6",6,6 "7",7,7 "8",8,8 "9",9,9 "10",10,10 Warning message: In write.csv(x, "", col.names = FALSE) : attempt to set 'col.names' ignored You have to use write.table if you don't want the column names; it is on the help page:
> write.table(x,sep=',', col.names=FALSE) "1",1,1 "2",2,2 "3",3,3 "4",4,4 "5",5,5 "6",6,6 "7",7,7 "8",8,8 "9",9,9 "10",10,10 > On Fri, Dec 18, 2009 at 8:37 AM, Reeyarn_ææºæ´_10928113 <reey...@gmail.com>wrote: > On Fri, Dec 18, 2009 at 7:52 AM, kayj <kjaj...@yahoo.com> wrote: > > > > Hi All, > > > > I always have a problem with write.csv when I want the column names to be > > ignored, when I specify col.names=F, I get a header of V1 V2 V3 V4 etc. > > > > I tried that and found the same problem, however, I found > write.table(mydata, file="data.csv",col.names=F) > works. > > write.csv calls write.table to save data, is there something wrong with it? > > -- > Best Regards, > Reeyarn T. Lee > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. > -- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve? [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.