小编Dan*_*nia的帖子

R:使用 RCurl 连接到 SFTP

我正在尝试连接到 SFTP 服务器。它是使用FIPS模式的加密服务器。我能够通过 WinSCP、FileZilla 和 bash sftp 命令连接并执行文件传输,没有任何问题

但是,我无法使用RCurl(R 版本=3.3.2,RCurl 版本=1.95-4.10,Windows 10)从 R 访问相同的 SFTP 。这是我的代码的样子以及正在生成的错误消息:

RCurl::ftpUpload(what="path/to/my/local/file.ext",
                 to = "sftp://my.eftp.server:portNumber/path/to/my/file.ext",
                 userpwd = "user:password",
                 .opts=curlOptions(verbose=TRUE))
Run Code Online (Sandbox Code Playgroud)

错误信息是:

*   Trying ###.###.###.##...
* Connected to my.eftp.server (###.###.###.##) port ## (#0)
* Failure establishing ssh session
* Closing connection 0
  Error in function (type, msg, asError = TRUE)  : 
  Failure establishing ssh session
Run Code Online (Sandbox Code Playgroud)

任何帮助都会很棒。我参考了以下内容,但没有成功: sftp with R - sftp not a protocol with RCurlUsing RCurl with SFTP 和 …

sftp curl r fips rcurl

5
推荐指数
0
解决办法
2398
查看次数

RMarkdown ztable的pdf_output | xtable | HTMLTABLE

我使用ztable,xtable或htmlTable包成功生成表,没有任何问题.但是,我想知道这些表是否可以作为pdf文档输出.当我尝试编织pdf_output时,不会显示该表.相反,信息显示为多个字符串.我试过改变乳胶引擎(使用ztable)和其他方法没有运气.

我看过这里:http:
//www.mzan.com/article/29773068-rmarkdown-latex-table-output-difficulties.shtml

我也看过小插曲等

示例(RMarkdown):

---  
output: pdf_document
---

```{r, message = F, results = 'asis'} 
# will throw out Error: pandoc document conversion failed with error 43
library(ztable)
data(iris)
options(ztable.type="latex") 
zt <- ztable(iris[1:5,], caption = "ztable")
zt <- addcgroup(zt,
                cgroup = c("group 1", "group 2"),
                n.cgroup = c(2,3))
print(zt)
```  

```{r, message = F }
# since it's html, will produce text only
library(htmlTable)
data(mtcars)
colnames(mtcars) <- NULL
htmlTable(mtcars[1:5,], caption = "htmlTable",
          cgroup = c("group 1", "group …
Run Code Online (Sandbox Code Playgroud)

r r-markdown

2
推荐指数
1
解决办法
846
查看次数

标签 统计

r ×2

curl ×1

fips ×1

r-markdown ×1

rcurl ×1

sftp ×1