I want to write a file and add new data to it in a seperate column. New data is added multiple times (12). sounds easy and there is lots of solutios available (use write.table and not write.csv, how to use write.table, ETH explanation on write.table) So I tried the following lines of code unsuccessfully. The new data is always added at the bottom of the first column.
write.table(df$c1, file="name.csv", row.names=F, col.names=F, append=T, sep=",")
write.table(df$c1, file="name.tsv", row.names=F, col.names=F, append=T, sep="\t")
sapply(df$c1, write.table, file="name.csv", append=TRUE, sep=",")
Above codes work for other users. I don't understand why they dont work in my case.