在安装包时如何修复这个错误?

时间:2020-12-14 23:09:46

This is what I did:

这就是我所做的:

install.packages("TSA",lib="D:/R/packages")    
library(TSA,lib.loc="D:/R/packages")    
install.packages("leaps",lib="D:/R/packages")  

still getting the error:

仍然得到错误:

library(TSA,lib.loc="D:/R/packages") 
#Error: package ‘leaps’ required by ‘TSA’ could not be found

1 个解决方案

#1


0  

There is a package TSA from CRAN. If you want to install it:

这是CRAN寄来的包裹。如果你想安装它:

install.packages("TSA")

install.packages(TSA)

If you already have .tar.gz files. I suggest using Hadley Wickham's devtoolspackage. It allows loading package from given directory:

如果你已经有焦油了。gz文件。我建议使用Hadley Wickham的devtoolspackage。它允许从给定目录加载包:

library(devtools)

# load package w/o installing
load_all('D:/R/packages')

# or invoke 'R CMD INSTALL'
install('D:/R/packages')

#1


0  

There is a package TSA from CRAN. If you want to install it:

这是CRAN寄来的包裹。如果你想安装它:

install.packages("TSA")

install.packages(TSA)

If you already have .tar.gz files. I suggest using Hadley Wickham's devtoolspackage. It allows loading package from given directory:

如果你已经有焦油了。gz文件。我建议使用Hadley Wickham的devtoolspackage。它允许从给定目录加载包:

library(devtools)

# load package w/o installing
load_all('D:/R/packages')

# or invoke 'R CMD INSTALL'
install('D:/R/packages')