I tried to develop hands-on materials for R with dashDB.
I want to use ggmap package to work with geospatial data, so I typed "install.packages("ggmap")" on RStudio provided by Bluemix.
I got the following result. I found the pre-installed package "ggplot" was older than that ggmap required.
install.packages("ggmap")
:
Loading required package: rpart
Loading required package: rpart.plot
Loading required package: ggplot2
* installing *source* package ‘ggmap’ ...
** package ‘ggmap’ successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Error : package ‘ggplot2’ 1.0.1 is loaded, but >= 2.0.0 is required by ‘ggmap’
ERROR: lazy loading failed for package ‘ggmap’
* removing ‘/mnt/blumeta0/home/dash101482/R/x86_64-redhat-linux-gnu-library/3.2/ggmap’
Warning in install.packages :
installation of package ‘ggmap’ had non-zero exit status
The downloaded source packages are in
‘/tmp/Rtmps0c2yk/downloaded_packages’
Cloud anyone please tell me how to solve or avoid this error?
Related
I'm using a Mac with OS Sierra 10.12.5. I'm having trouble with installing the R package "data.table," including if I try to install via install.packages("Hmisc"), or install.packages("data.table"). Both result in:
installing to /Library/Frameworks/R.framework/Versions/3.6/Resources/library/00LOCK-data.table/00new/data.table/libs
** R
** 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 from temporary location
Error: package or namespace load failed for ‘data.table’ in library.dynam(lib, package, package.lib):
shared object ‘datatable.so’ not found
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/data.table’
The downloaded source packages are in
‘/private/var/folders/bl/lgd7_j2j087f24tcly84xg580000gn/T/RtmpbM5EaD/downloaded_packages’
Warning message:
In install.packages("data.table") :
installation of package ‘data.table’ had non-zero exit status
I then tried installing directly from the .zip at: https://github.com/Rdatatable/data.table, but got the following "not available for R 3.6.3" message:
> install.packages("~/Downloads/data.table-master.zip")
Warning message:
package ‘~/Downloads/data.table-master.zip’ is not available (for R version 3.6.3)
I tried the approaches in this thread, but none worked :\ : Problems installing data.table for R
Any advice for what I can try next, or where I can access a version of data.table specifically for R 3.6.3?
Having issues downloading nflscrapR. Not sure if anyone else has this issue. Output from trying to install below:
Installing package into ‘C:/Users/cciar/OneDrive/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
* installing *source* package 'nflscrapR' ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** byte-compile and prepare package for lazy loading
Error: (converted from warning) package 'magrittr' was built under R version 3.6.3
Execution halted
ERROR: lazy loading failed for package 'nflscrapR'
* removing 'C:/Users/cciar/OneDrive/Documents/R/win-library/3.6/nflscrapR'
Error: Failed to install 'nflscrapR' from GitHub:
(converted from warning) installation of package ‘C:/Users/cciar/AppData/Local/Temp/Rtmp6diEQG/file5f042b671761/nflscrapR_1.8.3.tar.gz’ had non-zero exit status
I boot up a clean instance of R Studio. I don't save my environments and I don't use an Rprofile file. I tried both commands:
install.packages("viridis")
install.packages("viridis", dependencies = TRUE)
and I get this error:
installing source package ‘viridis’ ...
** package ‘viridis’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading Error : object ‘cividis’ is not exported by 'namespace:viridisLite' ERROR: lazy loading failed for
package ‘viridis’
removing ‘/home/stackinator/Rlibs/viridis’ Warning in install.packages : installation of package ‘viridis’ had non-zero exit status
Try the following:
if (!require("devtools")) install.packages("devtools")
devtools::install_github("sjmgarnier/viridis")
I am not sure why downloading it from CRAN didn't work, but devtools::install_github() downloads the source package from the repository rather than the bundled package that you get from CRAN with install.packages()
For more, check out this discussion from R Packages book:
http://r-pkgs.had.co.nz/package.html
Trying to install pmml package using R Studio on Red Hat. I get the following output:
================================================
downloaded 136 KB
* installing *source* package 'pmml' ...
** package 'pmml' successfully unpacked and MD5 sums checked
** R
** data
** inst
** preparing package for lazy loading
Error : object 'str_interp' is not exported by 'namespace:stringr'
ERROR: lazy loading failed for package ?pmml?
* removing '/usr/lib64/R/library/pmml'
Warning in install.packages :
installation of package 'pmml' had non-zero exit status
You have outdated stringr package. Install the new stringr package from CRAN with:
install.packages(c("stringr"))
I'm trying to install a package in CRAN and one of the dependencies is throwing this error:
* installing *source* package ‘viridis’ ...
** package ‘viridis’ successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Warning: S3 methods ‘fullseq.Date’, ‘fullseq.POSIXt’, ‘fullseq.numeric’, ‘print.trans’ were declared in NAMESPACE but not found
Error in library.dynam(lib, package, package.lib) :
shared object ‘scales.so’ not found
ERROR: lazy loading failed for package ‘viridis’
This is on Linux 12.04.5 LTS,
R version 3.2.5
Turns out you can solve this with
install.packages('scales')