I'm trying to install the package "circlize" and I am having trouble resolving what seems to be a simple error.
When I run:
install.packages("circlize")
It says:
Installing package into ‘*file location*/3.2’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependency ‘GlobalOptions’ is not available
There is a binary version available but the source version is later:
binary source needs_compilation
circlize 0.3.10 0.4.3 FALSE
installing the source package ‘circlize’
trying URL 'https://mirrors.sorengard.com/cran/src/contrib/circlize_0.4.3.tar.gz'
Content type 'application/x-gzip' length 2456906 bytes (2.3 MB)
downloaded 2.3 MB
* installing *source* package 'circlize' ...
** package 'circlize' successfully unpacked and MD5 sums checked
** R
** demo
** inst
** preparing package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace 'GlobalOptions' 0.0.11 is being loaded, but >= 0.0.12 is required
ERROR: lazy loading failed for package 'circlize'
* removing '*file location*/3.2/circlize'
Warning in install.packages :
running command '"*file location*/x64/R" CMD INSTALL -l "*file location*\3.2" *file location*/downloaded_packages/circlize_0.4.3.tar.gz' had status 1
Warning in install.packages :
installation of package ‘circlize’ had non-zero exit status
The downloaded source packages are in
‘*file location*\downloaded_packages’
These parts seem most relevant to me:
dependency ‘GlobalOptions’ is not available
namespace 'GlobalOptions' 0.0.11 is being loaded, but >= 0.0.12 is required
When I run sessionInfo() I see under "other attached packages": [1] GlobalOptions_0.0.11
My best guess is that I have the wrong version of GlobalOptions -- I see that GlobalOptions v0.0.13 is available here, but being new to R, I'm not sure what to do now to get the right version up and running.
I'd really appreciate if someone could tell me where I should look next. (I looked through the documentation within that link, but I'm still lost about what to do now.) Thanks!
If you have R version >=3.3.0 you should
install GlobalOptions_0.0.13 from CRAN
install.packages("GlobalOptions")
quit and restart R
re-install circlize from source as before.
If you have an older R version, update R to a more recent version first.
Related
I'm a complete beginner with R and any kind of programming really, and struggling with installing the LTM package for use in making a rasch analysis in SPSS 26.
I've used the command
install.packages("ltm")
tried in R3.3, 3.5 and 3.6 (all in MS windows) as these are compatible with the versions of SPSS I have access to, and get the following output returned:
*Installing package into ‘C:/Users/info/OneDrive/Documents/R/win-library/3.5’ (as ‘lib’ is unspecified) also installing the dependencies ‘admisc’, ‘polycor’ There are binary versions available but the source versions are later:
binary source needs_compilation admisc 0.8 0.28 FALSE polycor 0.7-10 0.8-1 FALSE ltm 1.1-1 1.2-0 FALSE installing the source packages ‘admisc’, ‘polycor’, ‘ltm’ trying URL 'https://cran.ma.imperial.ac.uk/src/contrib/admisc_0.28.tar.gz' Content type 'application/x-gzip' length 58877 bytes (57 KB) downloaded 57 KB trying URL 'https://cran.ma.imperial.ac.uk/src/contrib/polycor_0.8-1.tar.gz' Content type 'application/x-gzip' length 13931 bytes (13 KB) downloaded 13 KB trying URL 'https://cran.ma.imperial.ac.uk/src/contrib/ltm_1.2-0.tar.gz' Content type 'application/x-gzip' length 287001 bytes (280 KB) downloaded 280 KB
* installing *source* package 'admisc' ...
** package 'admisc' successfully unpacked and MD5 sums checked
** libs
*** arch - i386 Warning in system(cmd) : 'make' not found ERROR: compilation failed for package 'admisc'
* removing 'C:/Users/info/OneDrive/Documents/R/win-library/3.5/admisc'
* restoring previous 'C:/Users/info/OneDrive/Documents/R/win-library/3.5/admisc' In R CMD INSTALL
* installing *source* package 'polycor' ...
** package 'polycor' successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : namespace 'admisc' 0.8 is being loaded, but >= 0.22 is required ERROR: lazy loading failed for package 'polycor'
* removing 'C:/Users/info/OneDrive/Documents/R/win-library/3.5/polycor' In R CMD INSTALL ERROR: dependency 'polycor' is not available for package 'ltm'
* removing 'C:/Users/info/OneDrive/Documents/R/win-library/3.5/ltm' In R CMD INSTALL The downloaded source packages are in
‘C:\Users\info\AppData\Local\Temp\Rtmpc5HpAg\downloaded_packages’ Warning messages: 1: In install.packages("ltm") : installation of package ‘admisc’ had non-zero exit status 2: In install.packages("ltm") : installation of package ‘polycor’ had non-zero exit status 3: In install.packages("ltm") : installation of package ‘ltm’ had non-zero exit status*
I've also attempted to install earlier versions of admisc and polycor but get an error message that they are not available with this version of R.
Hope somebody can spot what I'm doing wrong here!
Thanks in advance
The error message 'make' not found suggests that you need to install Rtools to be able to build packages in Windows.
Since you are using an old R version you also need older Rtools version like Rtools35, found here.
When installing Rtools remember to add rtools to Path using the checkbox in the dialog similar to that one.
there is this long error message when i try to install ggplot, please someone help me. Thanks!
install.packages("ggplot2")
Installing package into ‘C:/Users/HP/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependency ‘rlang’
There are binary versions available but the source versions are later:
binary source needs_compilation
rlang 0.3.4 1.0.1 TRUE
ggplot2 3.1.1 3.3.5 FALSE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/rlang_0.3.4.zip'
Content type 'application/zip' length 1080437 bytes (1.0 MB)
downloaded 1.0 MB
package ‘rlang’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\HP\AppData\Local\Temp\Rtmpwfvrv8\downloaded_packages
installing the source package ‘ggplot2’
trying URL 'https://cran.rstudio.com/src/contrib/ggplot2_3.3.5.tar.gz'
Content type 'application/x-gzip' length 3063309 bytes (2.9 MB)
downloaded 2.9 MB
installing source package 'ggplot2' ...
** package 'ggplot2' successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace 'rlang' 0.3.4 is being loaded, but >= 0.4.10 is required
ERROR: lazy loading failed for package 'ggplot2'
removing 'C:/Users/HP/Documents/R/win-library/3.4/ggplot2'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-34~1.1/bin/i386/R" CMD INSTALL -l "C:\Users\HP\Documents\R\win-library\3.4" C:\Users\HP\AppData\Local\Temp\Rtmpwfvrv8/downloaded_packages/ggplot2_3.3.5.tar.gz' had status 1
Warning in install.packages :
installation of package ‘ggplot2’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\HP\AppData\Local\Temp\Rtmpwfvrv8\downloaded_packages’
It's saying your "rlang" version is outdated. Update that, it should be fine. Update all the libraries, that's a good practice while installing packages. (you do the same from tool option in menubar of Rstudio and update package)
I need to install the "plm" package. After installing it, the "sandwich" package was missing.
> library(plm)
Error: package or namespace load failed for ‘plm’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘sandwich
Tried to install the "sandwich" package, returned with this:
Installing package into ‘library_path’
(as ‘lib’ is unspecified)
also installing the dependency ‘zoo’
There is a binary version available but the source version is later:
binary source needs_compilation
sandwich 2.3-4 2.4-0 FALSE
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/zoo_1.8-0.zip'
Content type 'application/zip' length 901864 bytes (880 KB)
downloaded 880 KB
package ‘zoo’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\directory\downloaded_packages
installing the source package ‘sandwich’
trying URL 'https://cran.rstudio.com/src/contrib/sandwich_2.4-0.tar.gz'
Content type 'application/x-gzip' length 1280592 bytes (1.2 MB)
downloaded 1.2 MB
'\\directory\My Documents'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
* installing *source* package 'sandwich' ...
** package 'sandwich' successfully unpacked and MD5 sums checked
** R
** data
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
Warning in file(con, "w") :
cannot open file '\\library_path/sandwich/doc/index.html': No such file or directory
Error in file(con, "w") : cannot open the connection
ERROR: installing vignettes failed
* removing '\\library_path/sandwich'
Warning in install.packages :
running command '"C:/R-34~1.1/bin/x64/R" CMD INSTALL -l "\\library_path" C:\directory/downloaded_packages/sandwich_2.4-0.tar.gz' had status 1
Warning in install.packages :
installation of package ‘sandwich’ had non-zero exit status
The downloaded source packages are in
‘C:\directory\downloaded_packages’
Had tried:
Reinstall R and RStudio directly to C (not in C:\Program Files)
Using this command to install all the dependencies:
install.packages("sandwich", dependencies=TRUE)
Still, the "non-zero exit status" appeared. Do you have any suggestions?
I am using Windows 7 (64 bit), R 3.4.1 and RStudio 1.0.153
I think i found a temporary answer for my problem. I previously had problems related to the privilege in writing the library folder in R. Tried to work around by turning off anti-virus live update, change the security of the R folder, etc. I thought it was worked, since I did not find anymore issues on "unable to move temporary installation....". But when I restart my computer, the problem came again.
Since I am working in a university provided laptop, I need to wait until the IT grants me access as an admin. While waiting for it, I created a new library in C:/ (in my case, I named it as "R library local"). Downloaded all the package to that library
install.packages("plm", dependencies = TRUE, lib = "C:/R library local")
And load the package from the library
library("plm", lib="C:/R library local")
It works well :)
Dunno if I still need the admin access for the library in R folder or not.
> require("caret")
Loading required package: caret
Loading required package: lattice
Loading required package: ggplot2
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘pbkrtest’
So I found that there is lack of "pbkrtest" then I tried to reinstall it.
> install.packages("pbkrtest")
Installing package into ‘C:/Users/ADMIN/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is
later:
binary source needs_compilation
pbkrtest 0.4-2 0.4-3 FALSE
installing the source package ‘pbkrtest’
trying URL 'https://rweb.crmda.ku.edu/cran/src/contrib/pbkrtest_0.4- 3.tar.gz'
Content type 'application/x-gzip' length 164415 bytes (160 KB)
downloaded 160 KB
* installing *source* package 'pbkrtest' ...
** package 'pbkrtest' successfully unpacked and MD5 sums checked
** R
** data
** inst
** preparing package for lazy loading
Warning: replacing previous import by 'stats::sigma' when loading 'pbkrtest'
Error : object 'sigma' is not exported by 'namespace:stats'
ERROR: lazy loading failed for package 'pbkrtest'
* removing 'C:/Users/ADMIN/Documents/R/win-library/3.2/pbkrtest'
The downloaded source packages are in
‘C:\Users\ADMIN\AppData\Local\Temp\Rtmpk7mJT0\downloaded_packages’
Warning messages:
1: running command '"D:/R-3.2.3/bin/x64/R" CMD INSTALL -l
"C:\Users\ADMIN\Documents\R\win-library\3.2"
C:\Users\ADMIN\AppData\Local\Temp\Rtmpk7mJT0/downloaded_packages/pbkrtest_0.4- 3.tar.gz' had status 1
2: In install.packages("pbkrtest") :
installation of package ‘pbkrtest’ had non-zero exit status
It seems like that the installation keeps failing.
As a result, I couldn't use other code using caret packages.
I faced this problem as well on Windows 7. I did following steps in the sequence and it worked.
a) Make sure your R version is updated latest R release 3.2.3
b) The default sources seems to be installing Unix version. So I manually downloaded https://cran.r-project.org/web/packages/pbkrtest/index.html for windows
c) Use manually install function from R menu to install the package.
Cheers,
Ratan
Check version of R by typing version in your console.
If version is not "version.string R version 3.3.2" or later then
Install new version of R from https://cran.r-project.org/bin/windows/base/
Update R version using Tools => Global Options in RStudio.
install package using "install.packages("caret")" in your console.
do require(caret).
test using ?createDataPartition.
I am trying to install the mediation package. However, this fails due to lacking dependencies:
> install.packages("mediation")
Installing package into ‘/home/simoncolumbus/R/i686-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/src/contrib/mediation_4.4.4.tar.gz'
Content type 'application/x-gzip' length 1463736 bytes (1.4 Mb)
opened URL
==================================================
downloaded 1.4 Mb
* installing *source* package ‘mediation’ ...
** package ‘mediation’ successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** demo
** inst
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
namespace ‘lattice’ 0.20-24 is already loaded, but >= 0.20.27 is required
Error : package ‘sandwich’ could not be loaded
ERROR: lazy loading failed for package ‘mediation’
* removing ‘/home/simoncolumbus/R/i686-pc-linux-gnu-library/3.0/mediation’
Warning in install.packages :
installation of package ‘mediation’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpWpmJqS/downloaded_packages’
This is somewhat surprising, because both lattice and sandwich, as well as zoo (which calls lattice) are up to date:
> installed.packages()
lattice "lattice" "/home/simoncolumbus/R/i686-pc-linux-gnu-library/3.0" "0.20-31" "recommended"
sandwich "sandwich" "/home/simoncolumbus/R/i686-pc-linux-gnu-library/3.0" "2.3-3" NA
zoo "zoo" "/home/simoncolumbus/R/i686-pc-linux-gnu-library/3.0" "1.7-12" NA
I've tried unloading the packages, updating them, installing them via the package manager - nothing seems to have an impact, though. Any suggestions?
Edit: Fixed the problem by updating to the latest available version of R; must be some incompatibility with the old version I was running that caused this.
Exit R. Delete the .Rdata file. Restart. The .Rdata file is able to hold and load packages.