Displaying 20 results from an estimated 1000 matches similar to: "Help with rJava"
2013 Sep 23
0
Unable to execute Java MapReduce (Hadoop) code from R using rJava
Hi All,
I have written a Java MapReduce code that runs on Hadoop. My intention is
to create an R package which will call the Java code and execute the job.
Hence, I have written a similar R function. But when I call this function
from R terminal, the Hadoop job is not running. Its just printing few lines
of warning messages and does nothing further. Here is the execution
scenario:
*>
2013 Feb 08
1
ClassNotFoundException when running distributed job using rJava package
Hi,
I have a MapReduce Java code, which I am calling from R using rJava. I have
prepared the R package and tested that successfully. But when I deployed
the package in a cluster and executed it, I am getting
ClassNotFoundException. If I run the same job directly without integrating
with R, it runs perfectly.
Here is my R code:
library(rJava)
muMstSpark <- function(mesosMaster = NULL, input =
2011 Apr 30
3
Copying to R a rectangular array from a Java class
Bare test code: My simple Java test class source and R test code follow:
public class RJavTest {
public static void main(String[]args) { RJavTest rJavTest=new RJavTest();
}
public final static String conStg="testString";
public final static double con0dbl=10000001;
public final static double[]con1Arr=new double[] {
10001,10002,10003,10004,10005,10006 };
public final static
2014 Sep 26
1
[rJava] RJavaClassLoader and system classloader
Hi everyone,
I want to call a Java application from R and have encountered some problems with the way rJava deals with the system class loader.
To run my application, I use the following R script:
> library(rJava)
> .jinit()
> .jaddClassPath("myApp.jar")
> rWrapper <- .jnew("org/test/RWrapper")
> .jcall(rWrapper,"V","start")
My Java
2009 Feb 11
0
More help with Binary Files
Does anyone else have any insights to this issue:
Henrick, thank you for your very quick response. I've examined the readBin
help file with respect to endian and I'm still not sure I'm getting this
correct.
Here is what I'm coding:
con <- file(file.choose(), open="rb")
Year66 <- readBin(con, what=integer(), signed = TRUE, size = 2,
endian="little", n
2010 May 10
0
Fw: [R] Installing randomForest on Ubuntu Errors
I encountered difficulties installing randomForest on a Ubuntu Linux OS.
Dirk was very helpful and provided the solution below.
Many thanks.
Steve
Steve Friedman Ph. D.
Spatial Statistical Analyst
Everglades and Dry Tortugas National Park
950 N Krome Ave (3rd Floor)
Homestead, Florida 33034
Steve_Friedman at nps.gov
Office (305) 224 - 4282
Fax (305) 224 - 4147
----- Forwarded by Steve
2007 Sep 27
2
rJava and RJDBC
I am desperate for help.
I am trying to get the RJDBC and rJava .5to work on both my windows xp
and linux Redhat EL5 Server. On both I get a
ava.lang.ClassNotFoundException when calling JDBC().
My example is
require(RJDBC)
classPath='C:\\libraries\\mysql-connector-java-5.1.3-rc\\mysql-connector-java-5.1.3-rc-bin.jar'
driverClass=c("com.mysql.jdbc.Driver")
drv <-
2008 Feb 19
1
rJava and matrices
Hi list,
I'm wanting to use a matrix as input to some java code, but I seem to be
unable to do this (See code below). When searching online for a solution I
found that rJava 0.5-2 (the version under development not yet in CRAN) is
adding "direct support for raw vectors as method parameters". Is this
related?
I also tried to use .jarray / .jcast in various combinations to no avail.
2013 Jan 16
1
How to call Java main method using rJava package?
Hi,
I am trying to integrate my Java program with R using rJava package. I want
to execute the whole Java program from R. The main() method in my Java code
calls all the other defined methods. So, I guess I have to call the main()
method in .jcall.
An example Java code:
*class A {
public static int mySum(int x, int y) {
return x+y;
}
public static void
2008 Jul 02
1
Usage of rJava (.jcall) with Weka functions, any example?
Dear All,
I'd like to use Weka functions that are not implemented (do not have
interface) in RWeka, like the Remove function and others in the
future!
The .java() functionality is for that purpose but I haven't seen any
example with Weka functions. Could anyone give me hand in how to do
it? For instace if I want to use the
weka.filters.unsupervised.attribute.Remove?
1. in the R console,
2010 Aug 18
1
rJava: System.exit(1) in Java causes R crash
I'm writing a package that successfully calls Java from R using rJava.
When R sends my Java function bad data (through .jcall()),
I get the error message details (when I run it on a console)
and then:
Java requested System.exit(1), closing R.
Is there a way to call .jcall so that when Java receives bad data,
the Java function will exit, but won't take down R with it?
Thanks,
Sigal
2010 Dec 28
1
rJava question
After some trial and error I figured out how to pass matrices from R to java
and back
using rJava, but this method is not documented and I wonder if there is a
better way?
Anyway, here is what I found works:
(m = matrix(as.double(1:12),3,4))
[shows m as you would expect]
jtest <- .jnew("JTest")
(v <- .jcall(jtest, '[[D], 'myfunc', .jarray(m), evalArray=FALSE))
[shows
2011 Jun 26
1
RJDBC and multiple classpaths
Corect me if this is not the right place to post this.
I have a mdbdriver.jar (to access an MSAccess file) under Linux. I bought
the license from http://www.csv-jdbc.com/ guys. The driver work fine when
tested with DBVisualizer or another JDBC thing.
The problem is that driver needs 3 other more jar files to work. Under R I
have tried this and does not work:
> library(RJDBC)
Loading required
2009 Mar 02
1
Trouble - Installing R on RedHat el5
I am lucky and am now working with a new Redhat Linux 64-bit OS
But I am getting the following error can anyone provide some graciously
needed assistance:
[root at bluebird system-files]# rpm -i R-2.8.1-1.rh5.x86_64.rpm
warning: R-2.8.1-1.rh5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID
99b62126
error: Failed dependencies:
xdg-utils is needed by R-2.8.1-1.rh5.x86_64
Thanks
2009 Feb 27
0
Setting initial starting conditions in scripts
Hello,
I'm writing a variety of R scripts and want to code the loadhistory and
workspace from within the script. I found the loadhistory function but do
not see a comparable function for load workspace. Is there one ?
Working with R 2.8.1 (2008-12-22) on a windows platform.
Thanks for any and all suggestions.
Steve
Steve Friedman Ph. D.
Spatial Statistical Analyst
Everglades and Dry
2008 Oct 14
1
Advice on Computer Specifications
Hello
I'm running into a variety of limitations with my computer complaining that
it doesn't have sufficient memory. It is a Dell Latitude D630 Duo Core
CPU T7700 @ 2.40 GHz, with 3.50 GB RAM.
I'm working with relatively large dataframes
> dim(AllYears)
returns 4071840 records with 13variables
sometimes this complains that it can not allocate vectors of 16.0 Mb and
will
2008 Nov 13
1
Plotting from a list
Hello,
I am working with version 2.7.2 on a PC and have 2.8.0 available, but have
not upgraded completely yet.
I have 6 species for which I've run 6 unique environmental management
scenarios against for comparison purposes. Each scenario is run for 36
years (1965 - 2000). Some of the species have subpopulations and other do
not. For those with subpopulations (A, B, C, D, E, and F) I have
2009 Mar 24
1
Help with lattice
Hello.
I'm working on a windows XP machine with R 2.8.1
I'm working with lattice and I don't understand how to set the size of the
text for the labels. Can anyone suggest a solution?
I'm establishing a melted dataframe first and then setting a key and
calling the plot as follows;
> key.variable <- list(space = "right", text =
list(levels(wbirdm$variable)),
2009 Apr 23
1
Setting lattice par parameters
Hello
I'm plotting a large suite of barcharts and need to modify the size of the
text for both the yaxis and xaxis labels.
I've tried using the following:
> trellis.par.set(list(par.ylab.text = list(cex = 0.65)),
trellis.par.set(list = par.xlab.text = list(cex = 0.65))))
On inspection, however after I invoke this line,
> trellis.par.get("par.ylab.text")
>
2009 Jul 01
0
help with superscripts in simple plots
Hello All,
When I use the following lines of code to create a plot and add labels
with R-square values the labels have a superscripted R2.
library(lattice)
xyplot(PropHatchedNests$Phatched + PropHatchedNests$PropNests +
PropHatchedNests$meanHSI + PropHatchedNests$RelMeanEggsNest ~
PropHatchedNests$Year, type = "b",
scales=list(tick.number=length(PropHatchedNests$Year)),