R将数据文件从ftp导入数据框

时间:2019-01-24 15:49:56

标签: r import ftp

如何从ftp导入数据文件到data.frame?

我使用:

userpwd <- "user:pw"
h <- curl::new_handle()
curl::handle_setopt(
handle = h,
httpauth = 1,
userpwd = userpwd
)

resp <- curl::curl_fetch_disk("ftp://xxx/testfolder/", "test.csv", handle = h)

但是现在该怎么办?如何将测试文件夹中的数据文件从FTP带到R对象,例如。在数据框中?以及如何从测试文件夹中选择特定的数据文件?

0 个答案:

没有答案