[R] for loop and if problem

David Winsemius dwinsemius at comcast.net
Mon Jan 12 17:26:29 CET 2009


write.csv does exactly what you would expect ... creates a *Comma*  
Separated Values file. If you don't want a comma separated value  
format then use write.table with sep=";"

You can still name it "whatever.csv".

Or you if you also intend commas for decimal points,  use write.csv2  
as described in the help page:

"write.csv2 uses a comma for the decimal point and a semicolon for the  
separator, the Excel convention for CSV files in some Western European  
locales."


-- 
David Winsemius


On Jan 12, 2009, at 6:38 AM, Sake wrote:

>
> I have one final question...
> How can I save a CSV ifile with ; separation in stead of , separation?
> I know the write.csv(file="filename.csv") an that you can use  
> sep=";" when
> you open a .csv file, but that doesn't work with the write.csv  
> command.
> -- 
> View this message in context: http://www.nabble.com/for-loop-and-if-problem-tp21312449p21412888.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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.




More information about the R-help mailing list