Displaying 20 results from an estimated 7000 matches similar to: "rJava: System.exit(1) in Java causes R crash"
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
2006 Mar 16
1
handling warning messages
Is there any way to store the value of warnings but avoid printing them?
A simplified example:
> out <- c(0.2,0.3,0.4)
> var <- c(2,3,4)
> outcome <- glm(out ~ var, family=binomial())
Warning message:
non-integer #successes in a binomial glm! in: eval(expr, envir, enclos)
I don't like the warning printed,
but I would like to be able to check it's value after the
2009 Jun 02
1
C++ to R : 64bit to 32bit problem.
Hi,
I'm new to calling C++/C programs from R and am having some trouble getting
started. Following Sigal Blay (Simon Fraser University)'s instructions, I
have a .c file called "useC1.c":
/* useC1.c */
void useC(int *i) {
i[0] = 11;
}
This produces a .o file : "useC1.o" in a specified directory. I then open
R, set the proper directory and:
2010 May 01
3
Resize Graphics Window
Need way to resize an existing graphics window.
This should be applicable across platforms (as part of a package).
Context: function1() draws main plot (I'm using grid), function2() adds smaller plot
above main plot, but this one can sometimes overflow the original graphics window
area.
Thanks,
Sigal
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.
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
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
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 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,
2004 Nov 19
2
ERROR: installing package indices failed
Dear R-helpers,
I am developing a package named LDehatmap.
It depends on the "genetics" package
and includes two data files and a demo file.
When I'm trying to install it, I get the following messages:
* Installing *source* package 'LDheatmap' ...
** R
** data
** demo
** help
>>> Building/Updating help pages for package 'LDheatmap'
Formats: text html
2012 Oct 04
1
Intermittent connectivity issues for JDBC / Oracle
I have been experiencing issues with an R script hanging when connecting to
an Oracle database. To help debug, I found a function here in the nabble
forum and made a small test script:
#!/usr/bin/Rscript --no-restore --no-save --no-init-file
library("RJDBC")
drv<-JDBC("oracle.jdbc.OracleDriver","/home/oracle/lib/ojdbc6.jar", "'")
dbCheck =
2012 Mar 22
3
calling java from R and using java time series double precision array
I haven't had time to try using R for over a year, but have a colleage who
wants to.
We work with time series and our current version of our calendar-time
subroutines in
java converts both directions between linear time and calendar.
We have used calendar time since year 1965 starting out then with Fortran.
Calendar time can be CnYrMoDa | CnYrMoDaHr | CnYrMoDaHrMn | CnYrMoDaHrMnSc
|
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 Sep 06
1
Java exception error (Jcheck) while running an R script
Dear all,
I am facing a problem with running a script that i have written in R and i hope
you can help me spot which exactly is the problem and how i can solve it.
The error I get is the following:
----
Error in .jcheck(silent = FALSE) :
Java Exception <no description because toString() failed>.jcall(row[[ir]],
"Lorg/apache/poi/ss/usermodel/Cell;", "createCell",
2005 Feb 04
1
R package with C code on Windows
Dear R helpers,
MyPkg passes R CMD check on Linux machines.
However, when I 'R CMD check myPkg' on Windows,
the libs subdirectory is not being created.
If I install the package and then create the libs
subdirectory manually and copy the dll files to it,
the package seems to work fine
(but that's not good enough for submitting it to CRAN).
Any advice will be appreciated,
Thanks,
2005 Feb 04
1
R package with C code on Windows
Dear R helpers,
MyPkg passes R CMD check on Linux machines.
However, when I 'R CMD check myPkg' on Windows,
the libs subdirectory is not being created.
If I install the package and then create the libs
subdirectory manually and copy the dll files to it,
the package seems to work fine
(but that's not good enough for submitting it to CRAN).
Any advice will be appreciated,
Thanks,
2013 Nov 29
4
¿Cómo superar el error de Java?
Buenos días,
Me gustaría compartir una duda con la que me acabo de encontrar y no se
como solucionar, por si podrías echarme una mano:
Trabajo con bases de datos en R que importo de excel. Cargando las
librerías de: rJava , xlsxjars y xlsx. Al principio no parecía haber ningún
inconveniente, pero después de un tiempo de trabajo me aparece el siguiente
error en la consola de datos:
*Error in
2010 Jan 26
4
Error with toString
Hello there, I want to create a string from strings and numbers, here is my
code:
str <- "name" & toString(20)
but it returns me this error:
Error in toString(20) : could not find function ".jcall"
what did I do wrong? I couldn't find this error anywhere...
--
View this message in context: http://n4.nabble.com/Error-with-toString-tp1290327p1290327.html
Sent from
2018 Feb 06
4
rJava garbage collect
Hi
Does rJava offer a way to instruct the JVM to perform a garbage collection?
Regards
Ben
2006 Jan 26
2
What's wrong with JGR?
Hi all,
I downloaded and installed JGR. Then when I tried to load the package in R
console, it generated the following error message:
> local({pkg <- select.list(sort(.packages(all.available = TRUE)))
+ if(nchar(pkg)) library(pkg, character.only=TRUE)})
Loading required package: rJava
using Java Runtime version 1.5.0
using JAVA_HOME = C:\Program Files\Java\jre1.5.0_01
Loading required