当我尝试在R中安装googlepredictionapi_0.1.tar.gz包时,它说:
Installing package into ‘C:/Users/xxx/Documents/R/win-library/3.1’
(as ‘lib’ is unspecified)
* installing *source* package 'googlepredictionapi' ...
ERROR: a 'NAMESPACE' file is required
* removing 'C:/Users/xxx/Documents/R/win-library/3.1/googlepredictionapi'
* restoring previous 'C:/Users/xxx/Documents/R/win-library/3.1/googlepredictionapi'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-31~1.1/bin/x64/R" CMD INSTALL -l "C:UsersxxxDocumentsRwin-library3.1" "F:/R_working_Directory/googlepredictionapi_0.1.tar.gz"' had status 1
Warning in install.packages :
installation of package ‘F:/R_working_Directory/googlepredictionapi_0.1.tar.gz’ had non-zero exit status
Warning messages:
1: package ‘arules’ was built under R version 3.1.3
2: package ‘clValid’ was built under R version 3.1.3
3: package ‘ROCR’ was built under R version 3.1.3
4: package ‘gplots’ was built under R version 3.1.3
我使用了下面的代码,在谷歌网站上给出:
install.packages("googlepredictionapi_0.1.tar.gz", repos=NULL, type="source")
即使我去工具->安装包->浏览->选择包,它抛出相同的错误。
我正在使用最新的R-studio版本
有什么解决方法吗?
我刚刚用存档文件创建了一个github repo: https://github.com/byapparov/googlepredictionapi
你可以使用devtools安装它:
devtools:install_github("byapparov/googlepredictionapi")
但是包本身似乎已经过时了,所以在当前状态下可能不是很有用。