• Register
0 votes
904 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

1 vote
1 answer 189 views
189 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
0 votes
1 answer 696 views
696 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 103 views
103 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 286 views
0 votes
1 answer 1.8K views
1.8K views
Problem : I have been facing below error message and traceback: Error in FUN(X[[i]], ...) : only defined on the data frame with all numeric variables 5 stop("only defined on the data frame with all numeric variables") 4 FUN(X[[i]], ...) 3 lapply(args, ... .numeric(data[good,]) But now I get the different error message back as below : "Error: (list) object cannot be coerced to type 'double'"
asked Dec 16, 2019 alecxe 7.5k points
0 votes
1 answer 1.1K views
1.1K views
Problem : I am learning to work with neural networks in R. As a learning tutorial I am using the following problem over at Kaggle: https://www.kaggle.com/c/titanic This problem is specifically designed for people who want to learn and please note there is no reward ... Error in neurons[[i]] %*% weights[[i]] : requires numeric/complex matrix/vector arguments Can anyone help in resolving my issue?
asked Nov 27, 2019 alecxe 7.5k points
0 votes
1 answer 11 views
11 views
Problem: JSR 376: "Java platform module system" implemented within project Jigsaw . I want to know about java module A Java package techniques for organizing Java classes into namespaces. anyone provide me relevant answer about this question.
asked Nov 3, 2020 Mashhoodch 5.7k points
1 vote
1 answer 1.8K views
1.8K views
Problem : I want to perform a logistic regression but I am facing following error I am unable to find my mistake. summary(glm(prefmerkel~angst+crisismerkel+leadership+trustworthiness+ideology+pid+agegroups+gender+region,data=gles)) Error in glm.fit(x = c(1, 1, 1, 1, 1, 1, 1, ... In Ops.factor(eta, offset) : -' nicht sinnvoll für Faktoren 3: In Ops.factor(y, mu) : -' nicht sinnvoll für Faktoren
asked Nov 24, 2019 alecxe 7.5k points
0 votes
1 answer 1.9K views
1.9K views
Problem : I am trying to predict probabilities in a dataset by using glmnet but facing following issue cholmod error 'x and/or y have wrong dimensions' at file ../matrixops/cholmod_sdmult.c, line 90
asked Nov 13, 2019 peterlaw 6.9k points
0 votes
1 answer 94 views