I'm having difficulty installing this R package. It seems to install, but then fails to run with the following error. The type='source' also fails. Any idea what's going wrong?
> install.packages('RNetCDF')
Installing package into ‘/Users/robinedwards/Library/R/3.1/library’
(as ‘lib’ is unspecified)
trying URL 'http://cran.ma.imperial.ac.uk/bin/macosx/mavericks/contrib/3.1/RNetCDF_1.6.2-3.tgz'
Content type 'application/x-gzip' length 2112407 bytes (2.0 Mb)
opened URL
==================================================
downloaded 2.0 Mb
The downloaded binary packages are in
/var/folders/_s/ppznw4sx7p51kwv__hj3d8540000gn/T//RtmptxKC3g/downloaded_packages
> require(RNetCDF)
Loading required package: RNetCDF
Error : .onLoad failed in loadNamespace() for 'RNetCDF', details:
call: NULL
error: I/O error (udunits)
The problem appears to be udunits2, which RNetCDF uses and ncdf does not. Specifically
>> --with-udunits-lib='/soft/local/udunits-2.1.23/lib'"
is that path in the ld.so cache or in LD_LIBRARY_PATH? If not, it will not be found by dlload.
I actually found several threads about this error and every one of them involved Mac OS X. Is that what you're running?
Source: https://stat.ethz.ch/pipermail/r-help/2011-September/289074.html
Related
I was using glmmTMB on a cluster. It was working for several weeks. I logged on today and it says I need to install glmmTMB. So, I tried that, but R is giving me the error below.
The main part says: failed to lock directory.
Thanks for any advice.
Installing package into ‘/home/xxxxxx/R/x86_64-redhat-linux-gnu-library/4.0’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/glmmTMB_1.1.2.3.tar.gz'
Content type 'application/x-gzip' length 3910643 bytes (3.7 MB)
==================================================
downloaded 3.7 MB
ERROR: failed to lock directory ‘/home/xxxxxx/R/x86_64-redhat-linux-gnu-library/4.0’ for modifying
Try removing ‘/home/xxxxxx/R/x86_64-redhat-linux-gnu-library/4.0/00LOCK-glmmTMB’
Warning in install.packages :
installation of package ‘glmmTMB’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpYJgfa7/downloaded_packages’
I am trying to use the census_api_key() function in tidycensus, but keep getting an error that it can't be found, nor does it seem like the tidycensus library is being installed properly according to the error messages I am receiving.
Here is what I've done so far:
> install.packages("tidycensus")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/matia/OneDrive/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/tidycensus_0.11.4.zip'
Content type 'application/zip' length 2683556 bytes (2.6 MB)
downloaded 2.6 MB
> library(tidycensus)
Error: package or namespace load failed for ‘tidycensus’:
object ‘is_present’ is not exported by 'namespace:lifecycle'
In addition: Warning message:
package ‘tidycensus’ was built under R version 3.6.3
> census_api_key("my key")
Error in census_api_key("my key") :
could not find function "census_api_key"
I've also tried installing the rgdal library, as was suggested for other tidycensus errors, but this hasn't worked for me.
Any suggestions are greatly appreciated.
I got the following errors after installing and require the xlsx library in R:
> install.packages("xlsx")
trying URL 'http://cran.cnr.Berkeley.edu/bin/macosx/contrib/3.0/xlsx_0.5.5.tgz'
Content type 'application/x-gzip' length 395421 bytes (386 Kb)
opened URL
==================================================
downloaded 386 Kb
> require(xlsx)
Loading required package: xlsx
Error : .onAttach failed in attachNamespace() for 'xlsx', details:
call: .jnew("org/apache/poi/xssf/usermodel/XSSFWorkbook")
error: java.lang.NoClassDefFoundError: org/apache/xmlbeans/XmlObject
Tried and hunted around and can't figure out the problem. Does anyone know what the problem is?
The xlsx package doesn't support the latest Mac R version 3.01 & 3.02 but it works well under R 3.0. Use gdata::read.xls is recommended if so.
Hope somebody could help me .. I'm trying to install the mzmatch.R package for metabolomics, following the instructions here: http://mzmatch.sourceforge.net/tutorial.mzmatch.r.php
I'm completely new to R so this is my first time doing this sort of thing. First, I downloaded the latest version of R and installed it on Mac OSX 10.7. This is the version of R that I have running:
R 2.15.0 GUI 1.51 Leopard build 64-bit (6148)
Then I launched R64.app and typed the following commands (as specified in the instructions in the link above) to install the package and all its dependencies.
> source("http://bioconductor.org/biocLite.R")
> biocLite(c("faahKO", "xcms", "multtest"))
> install.packages(c("rJava","XML","snow","caTools","bitops","ptw"))
> source ("http://puma.ibls.gla.ac.uk/mzmatch.R/install_mzmatch.R")
The last step will always fail with the following message:
trying URL 'http://puma.ibls.gla.ac.uk/mzmatch.R/mzmatch.R.tar.gz'
Content type 'application/x-gzip' length 104535 bytes (102 Kb)
opened URL
==================================================
downloaded 102 Kb
* installing *source* package ‘mzmatch.R’ ...
** R
** preparing package for lazy loading
Error : .onLoad failed in loadNamespace() for 'mzR', details:
call: value[[3L]](cond)
error: failed to load module Ramp from package mzR
could not find function "errorOccured"
Error : package ‘mzR’ could not be loaded
ERROR: lazy loading failed for package ‘mzmatch.R’
* removing ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/mzmatch.R’
Warning message:
In install.packages(pkgs = "mzmatch.R.tar.gz", repos = NULL, type = "source") :
installation of package ‘mzmatch.R.tar.gz’ had non-zero exit status
I thought this was because the library "mzR" cannot be loaded, so I tried:
> biocLite("mzR")
> library("mzR")
and sure enough, the same error appeared:
Loading required package: Rcpp
Error : .onLoad failed in loadNamespace() for 'mzR', details:
call: value[[3L]](cond)
error: failed to load module Ramp from package mzR
could not find function "errorOccured"
Error: package/namespace load failed for ‘mzR’
I'm quite lost now, and not sure what to do at all. Thanks for reading !
Assuming you are running mzR v1.2.1 and Rcpp v0.9.12, the problem you see is an unfortunate and unexpected incompatibility between the two. In the meantime, downgrading to Rcpp_0.9.10.zip will fix the issue. Hope to commit a proper fix soon.
Laurent
UDAPE: The issue was the result of compiler/linker error and required a fresh mzR build, which is now available through biocLite.
Any ideas how I can install RTidyHTML when I get the following error message?
install.packages("RTidyHTML", repos = "http://www.omegahat.org/R", type="source")
trying URL 'http://www.omegahat.org/R/src/contrib/RTidyHTML_0.2-1.tar.gz'
Content type 'application/x-gzip' length 554953 bytes (541 Kb)
opened URL
==================================================
downloaded 541 Kb
* installing *source* package ‘RTidyHTML’ ...
./configure: line 3: make: command not found
ERROR: configuration failed for package ‘RTidyHTML’
* removing ‘/Library/Frameworks/R.framework/Versions/2.13/Resources/library/RTidyHTML’
You need to install XCode on your Mac if you want to compile from source. (Roman's comment only applies to Windows machines.) I just tried installing it on an XCode-equipped Mac running R 2.13.0 and get first a warning during compliation
ld warning: in libtidy/libtidy.a, file is not of required architecture
installing to /Library/Frameworks/R.framework/Versions/2.13/Resources/library/RTidyHTML/libs/x86_64
... and then get an error during the test load that is part of the install script:
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/Library/Frameworks/R.framework/Versions/2.13/Resources/library/RTidyHTML/libs/x86_64/RTidyHTML.so':
dlopen(/Library/Frameworks/R.framework/Versions/2.13/Resources/library/RTidyHTML/libs/x86_64/RTidyHTML.so, 6): Symbol not found: _tidyBufFree
Referenced from: /Library/Frameworks/R.framework/Versions/2.13/Resources/library/RTidyHTML/libs/x86_64/RTidyHTML.so
Expected in: dynamic lookup
I suppose it is possible that it may compile under a 32 bit version of R on the Mac.64-bit. See Simon Urbanek's web page: for more specifics and some installers for other packages.
EDIT: Installation while running 32bit R from the GUI was successful with a current R (version 2.13.1 RC (2011-07-03 r56263) )