Displaying 20 results from an estimated 71 matches for "jcall".
Did you mean:
call
2011 Apr 30
3
Copying to R a rectangular array from a Java class
...urn(con2Arr); }
}
library(rJava)
.jinit()
.jaddClassPath("C:/ad/j") # a directory on my disk
print(.jclassPath())
rJavaTst <- .jnew("RJavTest") # compilation of class code
connStg <- .jfield(rJavaTst,sig="S","conStg")
print(connStg)
connStgRet <- .jcall(rJavaTst,returnSig="S","retConStg")
print(connStgRet)
conn1Arr <- .jfield(rJavaTst,sig="[D","con1Arr")
print(conn1Arr)
print(conn1Arr[2])
conn1ArrRet <- .jcall(rJavaTst,returnSig="[D","retCon1Arr")
print(conn1ArrRet)
print(conn1ArrRe...
2012 Oct 04
1
Intermittent connectivity issues for JDBC / Oracle
...d 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 = function(url, user='', pwd='') {
j = .jcall("java/sql/DriverManager", "Ljava/sql/Connection;",
"getConnection", url, user, pwd, check=FALSE)
x = .jgetEx()
.jcheck()
x
}
dbCheck("jdbc:oracle:thin:@192.168.3.10:1521:psrndpt1","myuser","mypass")
When I run the file...
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
|
2008 Jul 02
1
Usage of rJava (.jcall) with Weka functions, any example?
...to use the
weka.filters.unsupervised.attribute.Remove?
1. in the R console, first I load a matrix file,
> matrix <- read.table(fileName, header=TRUE)
OK!
2. Second, I f I want to remove the first attribute with Weka:
> library(grid)
> library(rJava)
> library(RWeka)
> c <- .jcall("weka/filters/unsupervised/attribute/Remove","S","Remove","-R","1",matrix)
Is it that right?
I get this message error!
method Remove with signature
(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
not found
I've pla...
2010 Dec 28
1
rJava question
...rror 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 v = m + 10]
Here the JTest class has a method named myfunc that accepts
a double[][] and returns a double[][]. It simply adds 10 to every
element.
The parameter 'evalArray' is confusing because when
evalArray=TRUE th...
2010 Feb 23
2
Importing a file to r
Hello
I am trying to import the attached file Curva LIBOR to R. I am trying to use
the following commands and obtaining the following errors
> res <- read.xlsx("C:\\Users\\FELIPE
PARRA\\Documents\\Quantil\\Federacion\\Curva LIBOR.xlsx", 4)
Error en .jcall(rowCells[[ic]], "I", "getColumnIndex") :
RcallMethod: invalid object parameter
> res <- read.xlsx("C:/Users/FELIPE PARRA/Documents/Quantil/Federacion/Curva
LIBOR.xlsx", 4)
Error en .jcall(rowCells[[ic]], "I", "getColumnIndex") :
RcallMetho...
2008 Feb 19
1
rJava and matrices
...a
> t = rbind(c(1,2,3),c(2,3,4),c(1,2,10));
> .jinit()
> distanceMatrix = .jnew("data/structure/DistanceMatrix");
> .jmethods(distanceMatrix);
... other methods omitted for brevity ...
[4] "public void data.structure.DistanceMatrix.setDistances(double[][])"
> .jcall(distanceMatrix, "V", "setDistances", as.matrix(t));
Error in .jcall(distanceMatrix, "V", "setDistances", as.matrix(t)) :
method setDistances with signature ([D)V not found
Calls: .jcall -> .External
Execution halted
Thanks in advance,
ben
[[alternat...
2007 Sep 27
2
rJava and RJDBC
...verClass=c("com.mysql.jdbc.Driver")
drv <- JDBC(c("com.mysql.jdbc.Driver"),classPath,"`")
This returns a NULL value and a java exception.
> .jgetEx()
[1] "Java-Object{java.lang.ClassNotFoundException: com.mysql.jdbc.Driver}"
my java version is
> .jcall('java.lang.System','S','getProperty','java.version')
[1] "1.6.0_02"
jre
When I use java 1.5.0_11 jre I have the same problem but the .jgetEx()
is
> .jgetEx()
[1] "Java-Object{}
my class path is
> .jclassPath()
[1] "C:\\PROGRA~1\\R\\li...
2011 Nov 14
1
Error .jcall(mxe, "S", "fit", c("autorun", "-e", afn, "-o", dirout, : java.lang.NoSuchMethodError: density.Params.readFromArgs([Ljava/lang/String; )Ljava/lang/String;
Dear all,
I get the error when I use maxent.jar:
Error .jcall(mxe, "S", "fit", c("autorun", "-e", afn, "-o", dirout, :
java.lang.NoSuchMethodError: density.Params.readFromArgs([Ljava/lang/String;)Ljava/lang/String;
sessionInfo() result:
R version 2.14.0 (2011-10-31)Platform: i386-pc-mingw32/i386 (32-bit)...
2013 Sep 26
2
Read shortcuts of MS Excel files through R
...s OS, I created shortcuts (paste as shortcut) to excel
spreadsheets ( with "xlsx" as the file extension). I wasn't able to read
the shortcuts through R and using "read" functions of "xlsx" package.
exf <- "a1.xlsx.lnk"
> read.xlsx(exf,1)
Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, :
java.lang.IllegalArgumentException: Your InputStream was neither an OLE2
stream, nor an OOXML stream
> read.xlsx2(exf,1)
Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invoke...
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 main (String[] arg) {
System.out.println("The sum is " + mySum(2, 4));
}
}*
I can do the following to call the mySu...
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 the R help mailing list archive at Nabble.com.
2011 Mar 15
1
Problem with nls.lm function of minpack.lm package.
...meters (the way the parameter vector changes is decided by either
a finite difference method or the Jacobian function you supply).
There are some strange things going on with your models; in the case of
this call:
out <- nls.lm(par = guess, fn = fcn, jac = fcn.jac,
fcall = f.Th, jcall = j.Th,
h = h, Th = Th, control = nls.lm.control(maxfev = integer(),
maxiter = 10000, nprint=100))
The parameter estimates keep changing even after 1000 iterations. This is
not good.
In the second fit, I change the starting values slightly, to
##starting values (a...
2017 Nov 30
4
xlsx Fuera de memoria
Hola, estoy trabajando con el paquete xlsx y el xlConnect y ambos presentan
este mismo error.
Error in .jcall(cell, "V", "setCellValue", value) :
java.lang.OutOfMemoryError: Java heap space
Alguien conoce una solución.
Alguien conoce otro paquete para guardar documento de excel y que no
involucre el uso de Java.
--
*Wilmer Contreras Sepulveda*
*Grupo de Investigación en Desarrol...
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
2016 Dec 29
1
Re: [rhev-tech] virt-v2v failure during selinux re-lable
Reaching out to libguestfs@redhat.com. Thanks Shahar, I didn't know that
email alias existed. Also, I made the XML, full logs, and sosreport from
the VM in question available here [1]
[1] -http://people.redhat.com/~jcall/tmp.cKGPeNjfi8/
Thank you,
John Call
Red Hat - Solutions Architect
jcall@redhat.com
(714) 267-8802
On Thu, Dec 29, 2016 at 2:40 AM, Shahar Havivi <shavivi@redhat.com> wrote:
> try to ask libguestfs@redhat.com if you don't get answer here.
>
> On Wed, Dec 28, 2016 at 11:04 PM...
2012 Feb 27
0
Help with rJava
...a program from R and am
running into some confusing issues.
I've written this function:
DoNormalSkew <- function() {
.jaddClassPath("U:/development/software/untilities/ELVeSkew/dist/ELVeSkew.jar")
.jpackage("U:/development/software/utilities/ELVeS/dist/ELVeSkew.jar")
.jcall("java/lang/System", "V", method=Main.main(),
"U:/development/software/utilities/ELVeSkew/test/csv",
"U:/development/software/utilities/ELVeSkew/test/out.csv"
}
When I run this the function returns the following:
Error in .jcall("java/lang/System...
2012 Feb 09
1
Tr: Re: how to pass weka classifier options with a meta classifier in RWeka?
...? ? ?control=Weka_control(
> ? ? ? ? ? ?E="weka.attributeSelection.CfsSubsetEval",
> ? ? ? ? ? ?S="weka.attributeSelection.BestFirst -D 1",
> ? ? ? ? ? ?W="weka.classifiers.bayes.NaiveBayes -D"))
>
> But now, I get an error saying:
>
> Error in .jcall(classifier, "V", "buildClassifier", instances) :
> ? java.lang.Exception: Can't find class called:
> weka.classifiers.bayes.NaiveBayes -D
>
> indicating that the way I am passing the argument "-D" to the NaiveBayes
> is incorrect. I am uncertain fr...
2008 Oct 16
4
How to save/load RWeka models into/from a file?
.../NaiveBayes")
model<-NB(formula,data=data,...) # does not run but you get the idea
save(model,file="model.dat") # simple save R command
# ...
load("model.dat") # load the model from the previously saved file...
model # should work but I get instead this error:
Error in .jcall(x$classifier, "S", "toString") :
RcallMethod: attempt to call a method of a NULL object.
What is wrong and how can I solve this problem?
Regards,
--
Paulo Alexandre Ribeiro Cortez (PhD, MSc)
Lecturer (Prof. Auxiliar) at the Department of Information Systems (DSI)
Universi...
2013 Jul 22
1
problem loading large xlsx file into r
...I was trying to read has 36,500 rows X 188 col, ~ 37 MB size.
> options( java.parameters = "-Xmx4g" )
> library(xlsx)
Loading required package: xlsxjars
Loading required package: rJava
> cftc = read.xlsx("d:\\Krishna\\Research\\CFTC_COT\\cftcdata.xlsx", 1)
Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, :
java.lang.OutOfMemoryError: Java heap space
> sessionInfo()
R version 3.0.1 (2013-05-16)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_Unit...