1

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)
0

1 Answer 1

1

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)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.