Re: [Rd] How to efficiently share data (a dataframe) between R and Java

2015-12-16 Thread Ing . Jaroslav Kuchař
Thank you for the example. Based on my recent experiments, this solution is the most efficient. Cheers, Jaroslav On 2015-12-15 23:15, Simon Urbanek wrote: > You can pass the entire df, example: > >> data(iris) >> iris$sp = as.character(iris$Species) >> o=.jarray(lapply(iris, .jarray)) >> .jcall(

Re: [Rd] How to efficiently share data (a dataframe) between R and Java

2015-12-15 Thread Simon Urbanek
You can pass the entire df, example: > data(iris) > iris$sp = as.character(iris$Species) > o=.jarray(lapply(iris, .jarray)) > .jcall("C",,"df",o) df, 6 variables [0]: double[150] [1]: double[150] [2]: double[150] [3]: double[150] [4]: int[150] [5]: String[150] Java code: public class C {

Re: [Rd] How to efficiently share data (a dataframe) between R and Java

2015-12-15 Thread Ing . Jaroslav Kuchař
Dear all, thank you for your hints. I would prefer to do not use Rserve as Dirk mentioned. @Simon I have full control over the Java implementation - I can adapt the code that I use for the communication R <-> Java. > You can natively access structures on each side. The fastest way is to > use

Re: [Rd] How to efficiently share data (a dataframe) between R and Java

2015-12-06 Thread Simon Urbanek
On Dec 6, 2015, at 12:36 PM, Ing. Jaroslav Kuchař wrote: > Dear all, > > in our ongoing project we use Java implementations of several > algorithms. We also provide a “wrapper” implemented as an R package > using rJava (https://github.com/jaroslav-kuchar/rCBA). Based on our > recent experiments

Re: [Rd] How to efficiently share data (a dataframe) between R and Java

2015-12-06 Thread Dirk Eddelbuettel
On 6 December 2015 at 18:36, Ing. Jaroslav Kuchař wrote: | in our ongoing project we use Java implementations of several | algorithms. We also provide a “wrapper” implemented as an R package | using rJava (https://github.com/jaroslav-kuchar/rCBA). Based on our | recent experiments, the significant