[R] Writing .csv file
Don McKenzie
dmck at u.washington.edu
Wed Sep 24 23:06:31 CEST 2014
I believe you need to specify row.names = FALSE
See the help for write.table()
On Sep 24, 2014, at 2:00 PM, Steven Yen <syen04 at gmail.com> wrote:
> I use the following command to write data to a .csv file:
>
> write.csv(yxz,file="foo.csv")
>
> And I get the following in the file, with one column appended to the file:
>
> "","fsp","fsec","cincome",
> "1",0,3,2.25,...
> "2",0,1,2.75,...
> "3",1,1,0.625,...
>
> Question: is there a way to avoid the first column? Thanks.
>
> ______________________________________________
> R-help at 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.
Don McKenzie
Research Ecologist
Pacific Wildland Fire Sciences Lab
US Forest Service
Affiliate Professor
School of Environmental and Forest Sciences
University of Washington
dmck at uw.edu
More information about the R-help
mailing list