2
繼續之前,請下載RGoogleTrends_0.2-1.tar.gz
here,這是鄧肯寺郎的網站。RGoogleTrends:SSL證書的問題,驗證該CA證書是OK
重複的例子(或者,至少,我希望它將重複性由某人):
op <- par(no.readonly = TRUE)
Sys.setenv(TZ = 'UTC')
# In the command line below please insert the path of your RGoogleTrends package
install.packages('C:/.../RGoogleTrends_0.2-1.tar.gz', repos = NULL, type = 'source')
install.packages('DBI')
install.packages('quantmod')
install.packages('RCurl')
install.packages('RSQLite')
require(DBI)
require(RCurl)
require(RGoogleTrends)
require(RSQLite)
我已經創建了這些參數的谷歌帳戶:
login = [email protected]
password = econfol1
然後RGoogleTrends
代碼:
# The example below comes from RGoogleTrends package.
## Not run:
# Picks up c(login = password) from GooglePassword option
# i.e. set with
options(GooglePassword = c(cicciopafolr = 'econfol1'))
g = googleSignIn()
ans = getGTrends("coupon", curl = g)
## End(Not run)
結果代碼:
> g = googleSignIn()
Error in function (type, msg, asError = TRUE) :
SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
我sessionInfo()
:
> sessionInfo()
R version 2.15.2 (2012-10-26)
Platform: i386-w64-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] parallel stats graphics grDevices datasets utils methods base
other attached packages:
[1] RSQLite_0.11.3 RCurl_1.95-4.1 bitops_1.0-5 quantmod_0.4-0
[5] TTR_0.21-1 Defaults_1.1-1 DBI_0.2-6 RGoogleTrends_0.2-1
[9] Matrix_1.0-11 lattice_0.20-13 MASS_7.3-23 truncnorm_1.0-6
[13] numDeriv_2012.9-1 xts_0.9-3 zoo_1.7-9 RcppArmadillo_0.3.6.3
[17] Rcpp_0.10.2 rcom_2.2-5 rscproxy_2.0-5
loaded via a namespace (and not attached):
[1] grid_2.15.2 tools_2.15.2
我成功地運行'G = googleSignIn()'使用約'RCurl'的選項第二前端......但現在'getGTrends()'崩潰每次我啓動它時我RStudio會議。這是你得到的同樣的問題嗎? – 2013-04-30 11:51:29
是的。同樣的事情發生在我身上。在常規R控制檯中運行它以獲取錯誤消息。 – SchaunW 2013-04-30 13:16:30