I am trying install the R package esquisse, when I try to install it I get the following error message
Installing package into ‘/home/nir020/R/library’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependency ‘foreign’ is not available
But when i try to install the foreign package, I get the following error message
Warning in install.packages :
package ‘foreign’ is not available (for R version 3.5.1)
Do I need to update my version of R (difficult) or are there any other alternative solutions
(1) This is a warning, not an error, so esquisse might just work. (2) foreign is not available from CRAN because it's a recommended package, i.e. one that comes with a base R installation (and IIRC has been that way for many years).
I do see foreign in the dependencies of esquisse:
sort(package_dependencies("esquisse", recursive=TRUE)$esquisse)
but it's hard to trace the dependency back (it's not a direct dependency). I don't know why it wouldn't have been detected as already installed.
Related
I'm using R-4.1.1 and the last version of Rstudio.
My goal is to use the ggradar package but I cannot install it with install.packages because:
le package ‘ggradar’ is not available for this version of R
So I would like to install the application like this:
devtools::install_github("ricardo-bion/ggradar", dependencies=TRUE)
I managed to install devtools but when I try to:
library(devtools)
there is this error:
Error: le package ‘usethis’ nécessaire pour ‘devtools’, mais est introuvable
When I trying to install devtools with
install.packages("devtools",dependencies =TRUE)
it doesn't work. So finally, I try to install the package usethis
install.packages("usethis")
but I can't do it: I have a big error which ends with:
Warning in install.packages :
installation of package ‘usethis’ had non-zero exit status
Can you help me please?
I don't know the exact reason for your case, but things like this can happen as a result of an inconsistent package set. It is in general a good idea to update installed packages before installing new ones.
As you have seen, package usethis depends on devtools, see: https://CRAN.R-project.org/package=usethis that also shows that usethis is availabe for R 4.1.1.
In inconsistency already happened, i.a. due to an upgrade from R 4.1.0 or other installations, de-installation of the suspect packages, or just deletion of the user library can help in most cases.
How to do this depends on the operating system.
I am trying to install the package ggpubr using the command install.packages('ggpubr') but I'm getting the error:
Installing package into ‘/home/nasser/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependency ‘cowplot’ is not available
I then tried to install the package cowplot using install.packages('cowplot') command and again I got the following error Warning in install.packages : package ‘cowplot’ is not available (for R version 3.4.4)
I searched for a solution and found a suggestion to use the following command:
devtools::install_github("wilkelab/cowplot")
and I got this error ERROR: this R is version 3.4.4, package 'cowplot' requires R >= 3.5.0
After a long time searching for a solution, I ended up having no perfect solution.
Can you please suggest me a way to avoid this error?
You have version 3.4.4 of R installed. The package cowplot requires version 3.5.0 or higher. You must upgrade your version of R.
Sometimes this is not possible (such as on a work network). In these cases, an alternative is to install an older version of cowplot that does not have that requirement. Of course, this means you are using an older version of the package. Archives are available on CRAN for older package versions.
https://cran.r-project.org/src/contrib/Archive/cowplot/
I am trying to install SPEI in Rstudio, version 1.1.414, running on Windows 7. However, I get the following error message in the console:
install.packages("SPEI")
Installing package into ‘C:/Users/xxx/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependency ‘goftest’ is not available
also installing the dependency ‘lmomco’
It appears that this "goftest" package is unavailable, so how can I proceed?
Thank you.
'goftest' documentation says
Depends R (>= 3.3)
so probably you should upgrade to a later version of R to use the package: https://cran.r-project.org/web/packages/goftest/goftest.pdf
I am getting this errors trying to install caret package:
ERROR: compilation failed for package ‘ddalpha’
* removing ‘/home/rspark/R/x86_64-redhat-linux-gnu-library/3.3/ddalpha’
Warning in install.packages :
installation of package ‘ddalpha’ had non-zero exit status
ERROR: dependency ‘ddalpha’ is not available for package ‘recipes’
* removing ‘/home/rspark/R/x86_64-redhat-linux-gnu-library/3.3/recipes’
Warning in install.packages :
installation of package ‘recipes’ had non-zero exit status
ERROR: dependency ‘recipes’ is not available for package ‘caret’
* removing ‘/home/rspark/R/x86_64-redhat-linux-gnu-library/3.3/caret’
Warning in install.packages :
installation of package ‘caret’ had non-zero exit status
Any ideas?
install.packages("ddalpha")
It gives the same error:
/usr/lib64/R/library/BH/include/boost/exception/exception.hpp:137: error: expected declaration before end of line
make: *** [AlphaProcedure.o] Error 1
ERROR: compilation failed for package ‘ddalpha’
* removing ‘/home/rspark/R/x86_64-redhat-linux-gnu-library/3.3/ddalpha’
I have found a solution.
I had the same problem. After installing caret with all its dependencies, ddalpha was not installed. Then I tried installing the package ddalpha alone. I got the message:
" There is a binary version available but the source version is later:
binary source needs_compilation
ddalpha 1.2.1 1.3.1 TRUE
Do you want to install from sources the package which needs compilation?
y/n: n"
Well, if I anwser yes, it doesn't work. But when I answer no, it does work. It looks like the new version has some problem, but the previous one works fine.
As Roman indicated in the comments, ddalpha and recipes are dependencies that aren't installed yet. You can manually install them as follows:
install.packages(c('ddalpha', 'recipes'))
Alternatively, you can tell the install.packages() command to grab the necessary packages during the install process.
install.packages('caret', dependencies=TRUE)
Or list them explicitly:
install.packages('caret', dependencies=c('ddalpha', 'recipes'))
Or, if you use an IDE such as RStudio, the package manager that's included will automatically handle these dependencies for you.
If these suggestions don't solve the problem, you may try updating your instance of R to the latest (3.4.1 as I write this). Also, ddalpha is dependent on the Rcpp package version 0.11.0 or greater, so you may update that package.
update.packages('Rcpp')
I was facing the same issues, and I had tried almost all the methods mentioned here. But the only one that worked for me was updating my IDE and that sorted it out.
I had the same issue, running
install.packages('caret', dependencies=TRUE)
from console solved it. I don't know why at the packages window install with "install dependencies" checked didn't work..
R studio: 2022.07.1
R: 3.6.3
I am using R 3.3.1 version and while trying to install the package "e1071" in it I get the following message:
install.packages("e1071")
Installing package into ‘C:/Users/test/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
Package which is only available in source form, and may need compilation of
C/C++/Fortran: ‘e1071’
These will not be installed
Looking for ways to troubleshoot and getting an accurate answer for this problem.
In principle, the following should work:
Download the latest binary package from https://cran.r-project.org/web/packages/e1071/index.html
Inside R, execute the command
install.packages(pkgs = path_to_local_file, repos = NULL)
However, if this works then the direct installation should also work. It’s possible that there’s no compiled version for your R version on Windows. In that case, you need to install Rtools which makes this more complicated.