R语言程序包安装成功但

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.

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

是的。每次使用程序包都必须首先加载

比如:library(rootSolve)

library(tm)

在R中加载包是非常容易的,有两个函数可以做到:library 和 require。他们之间有一些细微的差别,主要的区别在于 require 会返回一个布尔值(True或False)来表示被加载的包是不是可用,而 library 函数会根据调用方式不同而有不同返回结果(这点在本书不重要)。要加载这些包可以用library或require任意一种。


欢迎分享,转载请注明来源:夏雨云

原文地址:https://www.xiayuyun.com/zonghe/419343.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-05-24
下一篇2023-05-24

发表评论

登录后才能评论

评论列表(0条)

    保存