Displaying 8 results from an estimated 8 matches for "jevalarray".
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
|
2016 Jan 15
2
JDataFrame API
...00] 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 ...
> $ V2: chr [1:1000000] "X0" "X1" "X2" "X3" ...
>
> For comparison using Java directly (includes both generation and reading into R):
>
>> system.time(temp <- lapply(J("A")$direct(), .jevalArray))
> user system elapsed
> 0.962 0.186 0.494
>
> So the JSON route is very roughly ~13x slower than using Java directly. Obviously, this will vary by data set type etc. since there is R overhead involved as well: for example, if you have only numeric variables, the JSON route i...
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
...= 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 the result is NOT evaluated (a list is returned
that you then have to apply .jevalArray to do get the answer).
There seems to be an option to have a java reference returned
instead of the actual matrix. Can the R side manipulate the
matrix (on the java side) through this reference?
Thanks,
Dominick
[[alternative HTML version deleted]]
2016 Jan 14
2
JDataFrame API
Hi Folks,
If you need to send data from Java to R you may consider using the
JDataFrame API -- which is used to convert data into JSON which then
can be converted into a data frame in R.
Here's the project page:
https://coherentlogic.com/middleware-development/jdataframe/
and here's a partial example which demonstrates what the API looks like:
String result = new JDataFrameBuilder()
2011 Mar 18
1
passing a 2D array from Java to R
Hello,
I have a 2D array of type double in java and I want to pass this data to R
in order to compute some statistics. Can anyone help me with this ?
Jose
--
View this message in context: http://r.789695.n4.nabble.com/passing-a-2D-array-from-Java-to-R-tp3387933p3387933.html
Sent from the R devel mailing list archive at Nabble.com.
2016 Jan 15
0
JDataFrame API
...2
$ V1: num [1:1000000] 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 ...
$ V2: chr [1:1000000] "X0" "X1" "X2" "X3" ...
For comparison using Java directly (includes both generation and reading into R):
> system.time(temp <- lapply(J("A")$direct(), .jevalArray))
user system elapsed
0.962 0.186 0.494
So the JSON route is very roughly ~13x slower than using Java directly. Obviously, this will vary by data set type etc. since there is R overhead involved as well: for example, if you have only numeric variables, the JSON route is 30x slower on r...
2016 Jan 15
0
JDataFrame API
...1 1.2 1.4 1.6 1.8 ...
>> $ V2: chr [1:1000000] "X0" "X1" "X2" "X3" ...
>>
>> For comparison using Java directly (includes both generation and reading into R):
>>
>>> system.time(temp <- lapply(J("A")$direct(), .jevalArray))
>> user system elapsed
>> 0.962 0.186 0.494
>>
>> So the JSON route is very roughly ~13x slower than using Java directly. Obviously, this will vary by data set type etc. since there is R overhead involved as well: for example, if you have only numeric variables, t...