在R中使用getURL访问ftp时出错

时间:2017-06-01 20:30:30

标签: r url download ftp rcurl

我想在互联网上访问文件,但是我收到以下错误消息:

Error in function (type, msg, asError = TRUE)  : Access denied: 530
In addition: Warning messages:
1: In strsplit(str, "\\\r\\\n") : input string 1 is invalid in this locale

这是我post的代码:

library(RCurl)    
url<'ftp://ftp.address'
    userpwd <- "user:password"
filenames <- getURL(url, userpwd = userpwd,
                    ftp.use.epsv=FALSE, dirlistonly = TRUE)

知道如何解决这个问题吗?

非常感谢你的帮助!

1 个答案:

答案 0 :(得分:1)

尝试:

library(RCurl)
filenames <- getURL(url="ftp://user:password@ftp.address",ftp.use.epsv=FALSE, dirlistonly = FALSE)