我想在多个R输出文件中写入3个标头。文件应如下所示:
details_URL= File created from xxxxx, source data www.john.com
下一个标题应该从变量得到输入,即
description= variable1_variable2
我如何做到这一点?
答案 0 :(得分:0)
这样的东西?
header <- rbind("header1", "header2", "header3")
for (i in 1:3){
write.csv(x = header, file = paste0("file",i,".txt"))
}