在文件中添加行 [英] Add lines to a file
本文介绍了在文件中添加行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是使用R的新手.我正尝试使用R中的现有数据向文件中添加新行.问题是我的数据大约有30000行和13000列.我已经尝试使用writeLines函数添加一行,但是结果文件仅包含添加的行.
I'm new using R. I'm trying to add new lines to a file with my existing data in R. The problem is that my data is of about 30000 rows and 13000 cols. I already try to add a line with the writeLines function but the resulted file contains only the line added.
推荐答案
Have you tried using the write
function?
line="blah text blah blah etc etc"
write(line,file="myfile",append=TRUE)
这篇关于在文件中添加行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文