I have merged two files in R using merge
and named it as 'mergedfile'. When I save the file as .txt on my desktop using write.table("mergedfile", "~/Desktop/mergedfile.txt", sep = "\t")
, it adds an autogenerated column of row numbers in the file. How can I remove this column without loosing any original headers' name in the file when using write.table
or another way to save the merged file on Desktop that doesn't include the first autogenerated column of row numbers?
Asked
Active
Viewed 266 times
0

Tabbi
- 69
- 1
- 9
1 Answers
1
You can try:
write.table(mergedfile,file="~/Desktop/mergedfile.txt",sep='\t',row.names = F)

Duck
- 39,058
- 13
- 42
- 84
-
Worked, thank you :) – Tabbi Jul 13 '20 at 15:38