Reputation: 351
I am trying to install some packages on my local folder. I just write
install.packages("tvReg" , repos = "http://cran.us.r-project.org")
On top of my R script. The results seem like the package is being installed like other packages but when I want to use it
library(tvReg)
it shows an error telling that there is no such package.
I checked the my-R-libs
folder, and there is no tvReg after installation. I also tried to copy the package files directly from GitHub link https://github.com/cran/tvReg, but this time the error says this is not a valid package and deletes it from the folder. All other packages I want to use are working correctly and this is the only one I can't install.
Upvotes: 0
Views: 229
Reputation: 3914
Most likely, the installation did not finish successfully. This package depends on a number of other packages. Try to install it again and pay attention to the last lines. You should see the following lines:
** package 'tvReg' successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (tvReg)
When installation is completed, test it:
library("tvReg")
# Loading required package: Matrix
# Funded by the Horizon 2020. Framework Programme of the European Union.
You can also execute the following command:.libPaths()
. It will list directories where R will search for packages. Your user directory should be first on that list. This directory will be used by default when you install R packages.
Upvotes: 0