[R] Help with writing data to csv

DL chombito718 at hotmail.com
Sat May 12 22:33:19 CEST 2012


I am trying to write data to csv but I am having issues with the separations. 

Basically I have some results that I get with R that I copied and pasted
into word and then saved as .txt 

I want to write the results to csv because it's easier to make tables in
word (all I would have to do is copy and paste into a table, instead of
typing everything out). 

I am able to write the data to the .csv file but the data is not
comma-delimited when I open the file. Everything is written into the first
cell. 

These are the various commands that I have been inputting:

write.csv(practice, file.choose(new=T), quote=F, row.names=F)

write.csv(practice, file.choose(new=T), sep=",", quote=F, row.names=F)
Warning message:
In write.csv(practice, file.choose(new = T), sep = ",", quote = F,  :
  attempt to set 'sep' ignored

write.table(practice, file =
"C:/Users/User/Documents/Documents/Proyectodeafroantillanos/Laterals/practice.csv",
sep="\t", quote=F, row.names=F)

 write.csv(practice, file =
"C:/Users/User/Documents/Documents/Proyectodeafroantillanos/Laterals/practice.csv")

> write.csv(practice, file =
> "C:/Users/User/Documents/Documents/Proyectodeafroantillanos/Laterals/practice.csv",
> row.names=FALSE)

write.csv(practice, file =
"C:/Users/User/Documents/Documents/Proyectodeafroantillanos/Laterals/practice.csv",
sep = "\t", row.names=FALSE)
Warning message:
In write.csv(practice, file =
"C:/Users/User/Documents/Documents/Proyectodeafroantillanos/Laterals/practice.csv", 
:
  attempt to set 'sep' ignored


As you can see, the commands in which I write to csv and set "sep" I get a
message saying that attempt to set "sep" ignored. All the other commands
work but I don't get a comma-delimited nor a tab-delimited file.

Am I doing something wrong?

Thank you. 

--
View this message in context: http://r.789695.n4.nabble.com/Help-with-writing-data-to-csv-tp4629436.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list