简体   繁体   中英

writing a file using write.table from R

I imported a text file into R and performed some operations. When i try to write the file using write.table, the generated text file has inverted commas at the beginning and the end of each lines. I do not need these. Any way to remove this using R?

"001723514161chfbed5e77A 59310057920012012-08-30011578579959" "003537255515ch3a6381b7A 59310057920012011-06-05011578579959"

Code:

write.table(my_data_updated, "mydata2.txt",row.names = F,col.names = F)

Use quote=F for example:

Data

my_data_updated <- c("001723514161chfbed5e77A 59310057920012012-08-30011578579959", "003537255515ch3a6381b7A 59310057920012011-06-05011578579959")

Write table

write.table(my_data_updated, "mydata2.txt",row.names = F,col.names = F, quote=F)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM