Hi Anna,
A column with all 0s will have a column sum of zero. So do this :
dataset1[, which(colSums(dataSet1 > 0))]
If you have a list of data.frames you could do this
for(index in 1:10)
{
write.csv(yourListOfTables[[index]], file = paste("Dataset", index,
".csv", sep = ""), row.names = FALSE)
}
- Dario.
--
View this message in context:
http://n4.nabble.com/Deleting-colmuns-with-0-s-and-also-writing-multple-csv-files-tp1561219p1561231.html
Sent from the R help mailing list archive at Nabble.com.
______________________________________________
[email protected] 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.