问题
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