2021年1月17日星期日

How can I write a txt file with multiple delimiters [R]?

I'm trying to write a txt file that has multiple delimiters:

text|||value_1|value_2||||  

Currently, I've tried:

write.table(variable, "file.txt", sep = "|", quote = FALSE, row.names = FALSE)  

But I'm not sure how to use multiple delimiters given that sep only takes in 1 argument. Will appreciate any help! Thank you!

https://stackoverflow.com/questions/65768540/how-can-i-write-a-txt-file-with-multiple-delimiters-r January 18, 2021 at 11:43AM

没有评论:

发表评论