【发布时间】:2017-11-27 12:16:14
【问题描述】:
我正在尝试在工作场所实施 R,并从我们所做的所有数据搅动中节省一点时间。
我们收到的很多文件都是通过 SFTP 发送给我们的,因为它们包含敏感信息。
我在 StackOverflow 和 Google 上四处查看,但似乎没有什么对我有用。我尝试使用网上找到的示例中的 RCurl 库,但它不允许我将 port(22) 作为登录详细信息的一部分。
library(RCurl)
protocol <- "sftp"
server <- "hostname"
userpwd <- "user:password"
tsfrFilename <- "Reports/Excelfile.xlsx"
ouptFilename <- "~/Test.xlsx"
url <- paste0(protocol, "://", server, tsfrFilename)
data <- getURL(url = url, userpwd=userpwd)
我最终得到错误代码
Error in curlPerform(curl = curl, .opts = opts, .encoding = .encoding) :
embedded nul in string:
任何帮助将不胜感激,因为这将为我们节省大量时间!
谢谢,
山
【问题讨论】: