Skip to content
Prev 279286 / 398506 Next

Export cols to single csv files

just use indexing.
without doing it all for you...

df <- structure(list(AA = c(0.3, 0.1, 0.6), BB = c(0.9, 0.4, 0.2), 
    CC = c(1, 0.8, 0.6), DD = c(0.7, 0.5, 0.5)), .Names = c("AA", 
"BB", "CC", "DD"), class = "data.frame", row.names = c(NA, -3L
))

write.csv(df[,1], paste(colnames(df[1]), "csv", sep="."))




Chega wrote
--
View this message in context: http://r.789695.n4.nabble.com/Export-cols-to-single-csv-files-tp4157484p4157537.html
Sent from the R help mailing list archive at Nabble.com.