Using R to upload many files

旧巷老猫 提交于 2019-12-25 08:59:22

问题


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://..., ...)

How can I to upload with the command ftpUpload many files?


回答1:


As @Soheil mentions, why not just save the files first, then upload?


Any reason you can't just do a for loop?

Something like:

files = c("f1.csv", "f2.csv", "f30.csv")
for (file in files){
    ftpUpload(file,
            paste("ftp://...",file,sep = ""),
            )
}


来源:https://stackoverflow.com/questions/30429108/using-r-to-upload-many-files

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!