I'm trying do load Rcmdr and keep getting an error message.
I'm using Rstudio Version 0.98.1091 on a OSX Yosemite operating system.
I have done the following:
install.packages("Rcmdr")
trying URL'http://cran.rstudio.com/bin/macosx/mavericks/contrib/3.1/Rcmdr_2.1-5.tgz'
Content type 'application/x-gzip' length 5342987 bytes (5.1 Mb)
opened URL
==================================================
downloaded 5.1 Mb
However, when I try to load it, I get the following error:
> library(Rcmdr)
Loading required package: splines
Loading required package: RcmdrMisc
Loading required package: car
Loading required package: sandwich
Error : .onLoad failed in loadNamespace() for 'Rcmdr', details:
call: structure(.External(.C_dotTclObjv, objv), class = "tclObj")
error: [tcl] invalid command name "tk_messageBox".
In addition: Warning message:
In fun(libname, pkgname) : couldn't connect to display ":0"
Error: package or namespace load failed for ‘Rcmdr’
I have already installed X11 and it still doesn't work.
I had this same issue-- but it ended up working fine as long as I had X11 running prior to opening R. Now it works fine. See if that works!
Related
When executing the code verbatim from the Amazon reference, the driver function is not found. I've installed and loaded the RJDBC package, however, the JDBC function cannot be found. Please forgive the output below. I included it to show the verbatim code from the reference is returning an error for me.
platform x86_64-apple-darwin15.6.0
arch x86_64
os darwin15.6.0
system x86_64, darwin15.6.0
status
major 3
minor 5.1
version.string R version 3.5.1 (2018-07-02)
nickname Feather Spray
> library(RJDBC)
Loading required package: rJava
Unable to find any JVMs matching version "(null)".
No Java runtime present, try --request to install.
Error: package or namespace load failed for ‘rJava’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.5/Resources/library/rJava/libs/rJava.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.5/Resources/library/rJava/libs/rJava.so, 6): Library not loaded: /Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home/lib/server/libjvm.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.5/Resources/library/rJava/libs/rJava.so
Reason: image not found
Error: package ‘rJava’ could not be loaded
In addition: Warning message:
In system("/usr/libexec/java_home", intern = TRUE) :
running command '/usr/libexec/java_home' had status 1
>
> # download Amazon Redshift JDBC driver
> download.file('http://s3.amazonaws.com/redshift-downloads/drivers/RedshiftJDBC41-1.1.9.1009.jar','RedshiftJDBC41-1.1.9.1009.jar')
trying URL 'http://s3.amazonaws.com/redshift-downloads/drivers/RedshiftJDBC41-1.1.9.1009.jar'
Content type 'application/x-java-archive' length 2055261 bytes (2.0 MB)
==================================================
downloaded 2.0 MB
>
> # connect to Amazon Redshift
> driver <- JDBC("com.amazon.redshift.jdbc41.Driver", "RedshiftJDBC41-1.1.9.1009.jar", identifier.quote="`")
Error in JDBC("com.amazon.redshift.jdbc41.Driver", "RedshiftJDBC41-1.1.9.1009.jar", :
could not find function "JDBC"
I am using macOS Sierra and R version 3.4.0.
I installed the package "rJava" using RStudio:
install.packages("rJava")
Warning in install.packages :
cannot open URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.4/PACKAGES.rds': HTTP status was '404 Not Found'
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.4/rJava_0.9-8.tgz'
Content type 'application/x-gzip' length 627959 bytes (613 KB)
==================================================
downloaded 613 KB
The downloaded binary packages are in
/var/folders/tq/f5jbfqp97y52w_y7byn05_fw0000gn/T//RtmpTdEVbA/downloaded_packages
Then when I try to run rJava I get:
> require(rJava)
Loading required package: rJava
Error: package or namespace load failed for ‘rJava’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so, 6): Library not loaded: #rpath/libjvm.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so
Reason: image not found
R, rJava and Java are little bit messy in macOS. In general, you have to make sure to properly configure all the elements. There is a clash between Oracle's and Apple's version.
Take a look here for very detailed instructions: R, Java, rJava and macOS adventures
I don't post the content here - it's quite long.
I am having trouble loading rattle on my mac, I have been pushed around to download X11 but cant seem to find a working page.
When trying to invoke rattle with the simple
library(rattle)
It has a popup about X11 and continue brings you yo this link https://support.apple.com/en-us/HT201341.
And I get this when trying to use the Rcmdr work around
library(Rcmdr)
Error : .onLoad failed in loadNamespace() for 'tcltk', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.2/Resources/library/tcltk/libs/tcltk.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.2/Resources/library/tcltk/libs/tcltk.so, 10): Library not loaded: /opt/X11/lib/libX11.6.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.2/Resources/library/tcltk/libs/tcltk.so
Reason: image not found
In addition: Warning message:
running command ''/usr/bin/otool' -L '/Library/Frameworks/R.framework/Resources/library/tcltk/libs//tcltk.so'' had status 1
Error: package or namespace load failed for ‘Rcmdr’
xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.
library(Rcmdr)
Error : .onLoad failed in loadNamespace() for 'tcltk', details:
call: fun(libname, pkgname)
error: X11 library is missing: install XQuartz from xquartz.macosforge.org
Error: package or namespace load failed for ‘Rcmdr’
install.packages("XQuartz")
--- Please select a CRAN mirror for use in this session ---
Warning message:
package ‘XQuartz’ is not available (for R version 3.2.1)
install.packages("tcltk")
Warning message:
package ‘tcltk’ is not available (for R version 3.2.1)
Any help here on getting Rattle to load with OS X Yosemite?
XQuartz isn't an R package, but rather an implementation of the X11 windowing system for Mac OS X. You need to install XQuartz to use the tcltk package in R, on which the Rcmdr depends, under Mac OS X.
See the Rcmdr installation notes for Mac OS X.
I hope this helps,
John
I have no idea what I'm doing but I need to use R and Rcmdr for my statistics class. I am running OS X 10.7.5, using 3.1.2 for R.
I have downloaded R.
install.packages("Rcmdr")
Picked a mirror, downloaded all packages. I then typed in
library(Rcmdr)
And received this error:
Loading required package: splines
Loading required package: RcmdrMisc
Loading required package: car
Loading required package: sandwich
Error : .onLoad failed in loadNamespace() for 'tcltk', details:
call: system2("otool", c("-L", shQuote(DLL)), stdout = TRUE)
error: error in running command
Error: package or namespace load failed for ‘Rcmdr’
sh: otool: command not found
When I do:
capabilities("tcltk")
# [1] TRUE
Have I done something wrong?
The R developers have tried to make a workaround for R not giving a useful error message when Tcl/Tk was not fully supported on a Mac. It seems R 3.1.2 depends on the otool from Xtools for this. However, you can download a patched version of R from http://r.research.att.com/ to remove the error.
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.