Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/75.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R中的connect()函数出错?_R_Rstudio - Fatal编程技术网

R中的connect()函数出错?

R中的connect()函数出错?,r,rstudio,R,Rstudio,在R中使用弹性软件包时,我在使用connect(“172.28.6.5”)时收到一条消息 信息详情: 在es_主机上找到http或https,请参阅文档 在此之后,当我运行命令时: res这就是你所做的吗?我运行这个命令没有问题 library(elastic) connect("172.28.6.5") #> transport: http #> host: 172.28.6.5 #> port: 9200 #> path:

在R中使用弹性软件包时,我在使用
connect(“172.28.6.5”)
时收到一条消息

信息详情:

在es_主机上找到http或https,请参阅文档

在此之后,当我运行命令时:


res这就是你所做的吗?我运行这个命令没有问题

library(elastic)
connect("172.28.6.5")
#> transport:  http 
#> host:       172.28.6.5 
#> port:       9200 
#> path:       NULL 
#> username:   NULL 
#> password:   <secret> 
#>   errors:     simple 
#> headers (names):  NULL 

(注意:这是一条
消息
而不是您在问题中遇到的
错误
)表明您正在传递与regex匹配的内容
^http[s]?://

ping 172.28.6.5
给您任何响应?以确定这是一个错误还是@jonathan carroll在回答中建议的消息,请提供屏幕截图(消息也为红色)。@VerenaHaunschmid这完全取决于您如何使用R(终端中的RStudio vs RGUI vs R)。但是是的,有必要对问题进行一些澄清。@JonathanCarroll你是对的,但问题被标记为rstudio:)@VerenaHaunschmid我的rstudio配置没有以红色突出显示错误/警告/消息;这是一个主题选择。所有这些都离题了。我确实做到了这一点,但它向我显示了一条消息“在es_主机上找到http或https,剥离,查看文档”。在这之后,我运行了这个命令:res你能不能启动一个新的会话,运行原始的命令(失败后再运行就没有意义了)并截图?基于“我做到了”很难调试。
  # strip off transport if found
  if (grepl("^http[s]?://", es_host)) {
    message("Found http or https on es_host, stripping off, see the docs")
    es_host <- sub("^http[s]?://", "", es_host)
  }