Hello list, I'm having some difficulty getting rJava to load in littler. Even after a R CMD javareconf and a reinstall of littler, I get this: jlaing at xenon:~$ r -e "require(rJava)" Loading required package: rJava Loading required package: methods Error : .onLoad failed in loadNamespace() for 'rJava', details: call: dyn.load(file, DLLpath = DLLpath, ...) error: unable to load shared object '/usr/local/lib/R/site-library/rJava/libs/rJava.so': libjvm.so: cannot open shared object file: No such file or directory It works fine with Rscript: jlaing at xenon:~$ Rscript -e "require(rJava)" Loading required package: rJava Loading required package: methods Presumably my load paths are misconfigured, but I can't figure out where: jlaing at xenon:~$ R CMD javareconf Java interpreter : /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java Java version : 1.6.0_24 Java home path : /usr/lib/jvm/java-6-openjdk-amd64/jre Java compiler : /usr/lib/jvm/java-6-openjdk-amd64/jre/../bin/javac Java headers gen.: /usr/lib/jvm/java-6-openjdk-amd64/jre/../bin/javah Java archive tool: /usr/lib/jvm/java-6-openjdk-amd64/jre/../bin/jar Java library path: $(JAVA_HOME)/lib/amd64/server:$(JAVA_HOME)/lib/amd64:$(JAVA_HOME)/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server -L$(JAVA_HOME)/lib/amd64 -L$(JAVA_HOME)/../lib/amd64 -L/usr/java/packages/lib/amd64 -L/usr/lib/x86_64-linux-gnu/jni -L/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -L/usr/lib/jni -L/lib -L/usr/lib -ljvm JNI cpp flags : -I$(JAVA_HOME)/../include System info: jlaing at xenon:~$ R --version R version 2.15.1 (2012-06-22) -- "Roasted Marshmallows" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: x86_64-pc-linux-gnu (64-bit) jlaing at xenon:~$ r --version r ('littler') version 0.1.5 svn revision 185 as of 2011-09-17 09:35:56 built at 15:30:55 on Sep 17 2011 using GNU R Version 2.13.1 (2011-07-08) Copyright (C) 2006 - 2011 Jeffrey Horner and Dirk Eddelbuettel Thanks, John
John, I see this: edd at max:~$ r -e'require(rJava)' Loading required package: rJava Loading required package: methods Error : .onLoad failed in loadNamespace() for 'rJava', details: call: dyn.load(file, DLLpath = DLLpath, ...) error: unable to load shared object '/usr/lib/R/site-library/rJava/libs/rJava.so': libjvm.so: cannot open shared object file: No such file or directory but also edd at max:~$ locate libjvm.so /usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/cacao/libjvm.so /usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/server/libjvm.so edd at max:~$ LD_LIBRARY_PATH="/usr/lib/jvm/java-6-openjdk-amd64/jre/lib/amd64/server" r -e'require(rJava)' Loading required package: rJava Loading required package: methods edd at max:~$ Java is a bit of a moving target. We did add edd at max:~/svn/littler$ ./configure --help|grep java --with-java-libs Link littler to R's java libraries edd at max:~/svn/littler$ a while back but that may not be sufficient. Would you have time to poke around at your end how we could make this better (presuming that you want something more solid than the LD_LIBRARY_PATH adjustment you could also do on your system-side). Dirk -- Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
Hi: I am trying to understand the link between ".csv" and ".rda" files. Is there any easy to follow tutorial on this? (I could do some of the operations below, but I got lost in the details.) 1. Reading .rda file ? data <- load("profit.rda") # supposed to have four variable --y x1 x2 state_name --how do I find out about the variable names, --take the log of y and x1 --extract y and calculate mean etc.. (I want to use it in lm regression lny = f(lnx1,x2)) **************** 2. How could I save this profit.rda file as a csv file with the variable names attached? I tried doing this: profit_data <- load("profit.rda") #Could I do this? write.csv(profit_data, file="profit.csv", col.names=TRUE) data2 <- read.csv("profit.csv", head = TRUE) # saving .rda file without the header? write.csv(profit_data, file="profit2.csv", col.names=FALSE) *********** 3. Creating a .rda file from a csv file using the save command data2 <- read.csv("poverty.csv", head = T, sep = ",") # poverty.csv file has 4 variables -- Q L K country_name save(data2, file="poverty.rda") --How do I attach names from the csv file to this .rda file? Best, Alok Bohara UNM
Seemingly Similar Threads
- r-cran-rjava dependencies on debian jesse, library(rJava) fails when default-jre is missing
- r-cran-rjava dependencies on debian jesse, library(rJava) fails when default-jre is missing
- rJava works on karmic for root but not for user sean
- Problem with rjava in linux
- rJava problem on ubuntu