• Register
0 votes
1.4k views

Problem :

My R and RStudio were working perfectly fine till I moved the folders while cleaning up my directories & files and now I am facing the following error message :

Should I reinstall the R and RStudio under the Program Files or Program Files (x86)? Also is it good practice to have two libPaths?

install.packages("C:/Users/alecxe/Downloads/fpp_0.5.zip", repos = NULL)
## Warning in install.packages :
## package ‘C:/Users/alecxe/Downloads/fpp_0.5.zip’
## is not available (for R version 3.0.0)
## Installing package into ‘C:/Users/alecxe/Documents/R/win-library/3.0’
## (as ‘lib’ is unspecified)
## package ‘fpp’ successfully unpacked and MD5 sums checked
library("fpp", lib.loc="C:/Users/alecxe/Documents/R/win-library/3.0")
Loading required package: forecast
## Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
## there is no package called ‘colorspace’
## Error: package ‘forecast’ could not be loaded
6 5 3
7,540 points

Please log in or register to answer this question.

2 Answers

0 votes

Solution :

Generally when you try to install the package using the RStudio package installer or directly from CRAN, it will not install the following dependencies "fracdiff", "Rcpp", "RcppArmadillo" and "colorspace" and so the R keeps showing the load namespace error. So to avoid this error you should install the package through, automatically installs all your dependencies and solves this issue.

install.packages("forecast",repos = c("http://rstudio.org/_packages",
 "http://cran.rstudio.com"))
OR
Use following command to resolve the issue::
install.packages("colorspace", dependencies = TRUE)
9 7 4
38,600 points
0 votes

Solution:

At the time you install the package using the RStudio package installer or directly from CRAN, it doesn't install the dependencies ("fracdiff", "Rcpp", "RcppArmadillo" and "colorspace") and therefore, R keeps throwing the load namespace error. Installing the package through, automatically installs all the dependencies and solves this issue.

install.packages("forecast",
                 repos = c("http://rstudio.org/_packages",
                           "http://cran.rstudio.com"))

The last time I encountered a very similar issue, using this code : install.packages("package's name", repos=c("http://rstudio.org/_packages", "http://cran.rstudio.com"))

Use this:

install.packages("colorspace", dependencies = TRUE)

Important Note:

 There is to first install ggplot2 explicitly installing all dependencies

install.packages(
   "ggplot2",
   repos = c("http://rstudio.org/_packages",
   "http://cran.rstudio.com")
)
#> You may also find it useful to restart R,
#> In RStudio, that's the menu Session >> Restart R

library(ggplot2)

 

10 6 4
31,120 points

Related questions

0 votes
1 answer 11 views
11 views
Problem: How I can fix this: Error in loadnamespace(j <- i[[1l]], c(lib.loc, .libpaths()), versioncheck = vi[[j]])
asked Mar 15 Wafa Abu Yousef 6.1k points
1 vote
1 answer 276 views
276 views
Problem: I have some knowledge about R and Rstudio. Currently I am trying to install the package known as dplyr but it constantly shows me the below error: Error in install.packages : missing value where TRUE/FALSE needed. Please find below my console history for your ... very limited knowledge about R and Rstudio so I am unable to fix it. I am still facing the same error please guide me.
asked May 26, 2020 Martin K 6.6k points
1 vote
1 answer 4 views
4 views
Problem: Need thr solution of this error. Error: package or namespace load failed for &lsquo;rjava&rsquo;.
asked Mar 28 PkGuy 13.1k points
0 votes
1 answer 8 views
8 views
Problem: Help me to solve this Error: package or namespace load failed for &lsquo;car&rsquo;?
asked Mar 20 Ifra 24.4k points
0 votes
1 answer 871 views
871 views
Problem : I am new to npm and now I am facing strange looking below error &ldquo;Error: EACCES: permission denied, access '/usr/local/lib/node_modules'&rdquo; Detailed error as below: npm ERR! path /usr/local/lib/node_modules npm ERR! code EACCES npm ERR! errno -13 npm ... code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path: '/usr/local/lib/node_modules' } Have somebody fixed this before?
asked Feb 20, 2020 mphil 2.3k points
1 vote
1 answer 193 views
193 views
Problem : I am very new to R. Currently I need to embed RInside to the required application on the windows 7 64-bit Operating system but if I try to initialize the RInside as shown below: Rin = new RInside(argc, argv); I often face the message as shown below for ... done lot of research to fix above R error but unable to fix it. So looking for R expert who can help in quick fixing above error.
asked May 5, 2020 stewart 4k points
0 votes
1 answer 3 views
3 views
Problem: I need help in resolving this problem: latex error option clash for package graphicx
asked Apr 7 rakib1 51.5k points
0 votes
1 answer 7 views
7 views
Problem: I&rsquo;m new in R. but i&rsquo;m having a issue. I'm attempting to run some fairly deep recursive code in R and it keeps giving me this error: Error: C stack usage is too close to the limit Please help me to fix this issue. Thanks.
asked Mar 15 Shovo210 14k points
0 votes
1 answer 2 views
2 views
Problem: Hi , I am actually stuck in this problem for a while can any one help me? this the problem: I couldn't resolve resource @id/visible when using TextInputLayout on appcompat-v7:25.x.x Tried these steps below, but the problem is still persist: Rebuild ... Rendering Problems. Couldn't resolve resource @id/visible Tip: Try to refresh the layout. NOTE: @id/visible is not present in the code.
asked 3 days ago ochena 1.2k points
0 votes
1 answer 19 views
19 views
Problem: In core_test.py I have the following import statement from ..components.core import GameLoopEvents However, when I run, I get the following error: tests$ python core_test.py Traceback (most recent call last): File "core_test.py", line 3, in <module> from ..components.core import GameLoopEvents ValueError: Attempted relative import in non-package
asked Feb 23 Mashhoodch 13k points