googlepredictionapi_0.12.tar.gz
并将其解压缩到临时文件夹中。然后在编辑器中打开googlepredictionapi/R/prediction_api_init.R
并删除这些行。myEmail <- ""
myPassword <- ""
myAPIkey <- ""
然后重新打包源文件并将其加载到R中:
tar czf googlepredictionapi.mod.tar.gz googlepredictionapi
R
remove.packages("googlepredictionapi")
install.packages("googlepredictionapi_0.12.tar.gz", repos=NULL, type="source")
你需要调用
install.packages("googlepredictionapi.mod.tar.gz", repos=NULL, type="source")
$HOME/.auth-token
。PredictionApiUtilGetAuth(verbose=TRUE)
来触发此过程,myEmail
和myPassword
必须事先设置好。)..., verbose=TRUE)
。据我最后了解(今年4月),R对于Google Prediction API的支持尚未升级为使用OAuth,因此当Prediction API从旧的客户端登录方案切换到OAauth 2.0时,它实际上破坏了R的功能。
ROAuth
或httr
进行身份验证。 - Maiasaura