使用R上传多个文件 [英] Using R to upload many files
本文介绍了使用R上传多个文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有 30 个文件:f1.csv、f2.csv、... f30.csv.我想用 R 上传所有文件,大约为:
I have 30 files: f1.csv, f2.csv, ... f30.csv. I would like to upload all files with R, about as:
ftpUpload(c(f1.csv, f2.csv, ... f30.csv), http://..., ...)
如何使用命令 ftpUpload many files 上传?
How can I to upload with the command ftpUpload many files?
推荐答案
正如@Soheil 提到的,为什么不先保存文件,然后上传?
As @Soheil mentions, why not just save the files first, then upload?
有什么理由不能只做一个 for 循环?
Any reason you can't just do a for loop?
类似于:
files = c("f1.csv", "f2.csv", "f30.csv")
for (file in files){
ftpUpload(file,
paste("ftp://...",file,sep = ""),
)
}
这篇关于使用R上传多个文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文