R语言程序包安装成功但

Python014

R语言程序包安装成功但,第1张

你是不是用R Gui安装的,提示已经说了缺少quadprog依赖包,

用R Gui安装的话需要先把依赖包一个个安装上,比较麻烦,

可以在Rstudio上安装,

install.packages('tseries')

also installing the dependencies ‘quadprog’, ‘zoo’

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/quadprog_1.5-5.zip'

Content type 'application/zip' length 52439 bytes (51 KB)

downloaded 51 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/zoo_1.7-13.zip'

Content type 'application/zip' length 899932 bytes (878 KB)

downloaded 878 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/tseries_0.10-35.zip'

Content type 'application/zip' length 327381 bytes (319 KB)

downloaded 319 KB

package ‘quadprog’ successfully unpacked and MD5 sums checked

package ‘zoo’ successfully unpacked and MD5 sums checked

package ‘tseries’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in

C:\Users\yuexf\AppData\Local\Temp\RtmpqqGpKz\downloaded_packages

>library(tseries)

‘tseries’ version: 0.10-35

‘tseries’ is a package for time series analysis and computational finance.

See ‘library(help="tseries")’ for details.

它会自动把依赖包给你安装上

在使用bioconductor安装一些包的时候,比如我安装GEOquery时,会有

Error in unpackPkgZip(foundpkgs[okp, 2L], foundpkgs[okp, 1L], lib, libs_only, :

ERROR: failed to lock directory ‘C:\Program Files\R\R-3.6.1\library’ for modifying

如下:

解决办法:找到‘C:\Program Files\R\R-3.6.1\library/00LOCK’ 将 00LOCK文件夹删掉,重新安装就可以了