当我使用以下命令写入数据框时:
write.table(dfArticles,"C:/Biology.txt",append = FALSE,sep=",",dec=".")
我得到以下结果:
"Title","Authors","AuthorAffiliations","CorrespondenceAuthor","PublishDate","Abstract","Keywords"
"1","Characterisation of genetic regulatory effects for osteoporosis risk variants in human osteoclasts","Benjamin H. Mullin,Jennifer Tickner,Kun Zhu,Jacob Kenny,S ..................
文件“ Biology.txt”在每一行的开头都包含值“ 1”“ 2”“ 3”...。
为什么包括数字?
答案 0 :(得分:1)
我们可以使用row.names = FALSE
参数。
write.table(dfArticles,"C:/Biology.txt",append = FALSE,sep=",",dec=".",row.names=FALSE)