【发布时间】:2016-02-17 22:40:22
【问题描述】:
我正在尝试将 R 绑定到 Twitter,但我尝试的一切都失败了。我一直在查看几个链接,包括以下链接:One、Two、Three
虽然这些导致了更多问题,但我现在正在查看链接 here 和 here 以尝试一些解决方法。我会将我的问题作为评论发布到这些链接中的任何一个,但我还没有足够的代表。
当我运行以下代码时,出现以下错误
代码:
library(base64enc)
library(RCurl)
library(httr)
set_config( config( ssl_verifypeer = 0L ) )
devtools::install_github("jrowen/twitteR", user="MY_USERNAME", password="MY_PASSWORD", ref = "oauth_httr_1_0")
错误:
WARNING: Rtools is required to build R packages, but is not currently installed.
Please download and install Rtools 3.3 from http://cran.r-project.org/bin/windows/Rtools/ and then run find_rtools().
Downloading GitHub repo jrowen/twitteR@oauth_httr_1_0
Error in download(dest, src, auth) : client error: (401) Unauthorized
我只是在如何下载这个开发 twitteR 包方面完全遗漏了一些东西吗?有没有人知道如何克服 401 错误?
谢谢,
【问题讨论】:
-
你安装 Rtools 了吗?
-
不认为它是必要的,因为我没有构建包。我会尝试的。
-
即使在安装 Rtools 并重新启动 R 之后,我也会遇到同样的错误。如下所述,当我离开
set_config( config( ssl_verifypeer = 0L ) )时,我收到错误Downloading GitHub repo jrowen/twitteR@oauth_httr_1_0 Error in curl::curl_fetch_memory(url, handle = handle) : Peer certificate cannot be authenticated with given CA certificates -
@JRW building 和 developing 包之间存在差异。构建意味着编译代码。您需要它来安装任何已编译代码的包。安装 Rtools 时要注意的一件事是fix your path。
标签: r github oauth twitter-oauth github-api