r - save data without any extra sign added to the data and separated by a tab character? -


actually trying save data using following command problem adds columns , signs don't want

lets data , want have saved

v1              v2     phenzine    2.376140e-05     dnium bte   2.423254e-05     trene       2.438986e-05     tilli       2.495574e-05     tnolone     2.511859e-05 

output tap separated between 2 columns in txt

        phenzine    2.376140e-05         dnium bte   2.423254e-05         trene       2.438986e-05         tilli       2.495574e-05         tnolone     2.511859e-05 

note did remove row names

rownames(df) <- null 

what

write.table(df, file= "~/desktop/df.txt", sep="\t" ) 

but appears below

"v1"   "v2" "1"             "phenzine"    2.376140e-05 "2"            "dnium bte"   2.423254e-05  "3"           "trene"       2.438986e-05 "4"            "tilli"       2.495574e-05 "5"            "tnolone"     2.511859e-05 

is there idea how prevent such output ?

you should export data

write.table(df, file= "~/desktop/df.txt", sep="\t", row.names=f, quote=f) 

by default, row.names exported (hence first "column" (without heading) getting) , character strings surrounded quotes.

doing row.names(df) <- null doesn't change that, changes row.names 1 length(df) (or nothing if row.names row numbers)


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -