how to avoid writing index of variable in write.table command, e.g. output---> index,character,state "1" "M" "2" "2" "K" "3" "3" "R" "1" "4" "E" "1" "5" "S" "1" "6" "H" "1" "7" "K" "1" "8" "H" "1" "9" "A" "1" "10" "E" "3" "11" "Q" "1" i tried col.name=FALSE & row.name=FALSE but it can't -- View this message in context: http://r.789695.n4.nabble.com/how-to-avoid-writing-index-in-write-table-command-tp4358557p4358557.html Sent from the R help mailing list archive at Nabble.com.
how to avoid writing index in write.table command
3 messages · sagarnikam123, Tal Galili, David Winsemius
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120205/d0669319/attachment.pl>
On Feb 5, 2012, at 2:53 AM, sagarnikam123 wrote:
how to avoid writing index of variable in write.table command, e.g. output--->
It's time to "get with the program", sagarnikam123. You are asked in the Posting Guide to provide a reproductible example. At the very least you should provide str() on your dataframe.
index,character,state "1" "M" "2" "2" "K" "3" "3" "R" "1" "4" "E" "1" "5" "S" "1" "6" "H" "1" "7" "K" "1" "8" "H" "1" "9" "A" "1" "10" "E" "3" "11" "Q" "1" i tried col.name=FALSE & row.name=FALSE but it can't
If row.names = FALSE didn't do it, then there is a named "index" column and you need to write an object from which you have removed the "index" column temp <- dfrm[,-1] write.table(temp, "filenam.txt", row.names=FALSE)
-- View this
Sent from the R help mailing list archive at Nabble.com.
Which is neither an arhcive nor is it the R help Mailing list.
David Winsemius, MD West Hartford, CT