6
I wonder how I do to export a generated data table within the R to format txt
or csv
?
6
I wonder how I do to export a generated data table within the R to format txt
or csv
?
8
You can use the function write.csv
or write.table
(documentation), as in the example below.
nomes <- c("Scooby", "Salsicha", "Fred", "Velma", "Daphne")
idades <- c(10, 18, 20, 21, 19)
tabela <- data.frame(nome = nomes, idade = idades)
write.csv(tabela, "ScoobyDoo.csv", row.names = FALSE)
Remember that to be automatically compatible with Microsoft Office in English, you can use write.csv2()
, that automatically puts sep=";"
and dec=","
. Similarly, read.csv2()
can be used to read these files.
Thank you for your reply. I am not aware of IT. I am Grateful!
Browser other questions tagged r table csv export
You are not signed in. Login or sign up in order to post.
I don’t want to be boring, but you could take a look at the R documentation first, besides being extremely simple the answer is instant.
– Artur_Indio