Re: [Rd] R_PROFILE_USER
On Sat, Dec 5, 2015 at 9:43 PM, arnaud gaboury wrote: > > On Sat, Dec 5, 2015, 9:39 PM peter dalgaard wrote: > > >> On 05 Dec 2015, at 18:07 , arnaud gaboury >> wrote: >> >> In my shell environment, I have set a path to R_PROFILE_USER. The >> file, Rprofile.R, is a collection of small hacks. >> >> I want to build rstudio-server from source. Best is to $ unset >> R_PROFILE_USER before. Unfortunately, this has no effect on my system. >> >> --- >> poisonivy@poppy ➤➤ ~ % R >> >> *** Successfully loaded .Rprofile *** >> >> Welcome back poisonivy >> working directory is: /home/poisonivy >> poisonivy@poppy [R] >> - >> >> As you can see, R is still behaving like the profile is used. What is >> annoying, is that Cmake will at one point not find my LibR. Error >> message: missing LIBR_LIBRARIES). The Cmake command is this one: >> >> - >> % R --slave --no-save -e "cat(R.home('lib'))" >> >> *** Successfully loaded .Rprofile *** >> >> /usr/lib64/R/libGoodbye poisonivy Sat Dec 5 18:03:06 2015 >> -- >> >> and as you can see, the result is polluated by my profile. I can't >> edit Cmake file to add "--vanilla" as they are generated each time I >> start cmake. >> >> Even deleting my Rprofile.R file, the environment still persists. I >> have no idea why this behavior. >> >> Any hints why I can't unset my profile user ? > > Umm, it said that it loaded .Rprofile, not Rprofile.R. Any chance that you > have similar code in two places? (~/.Rprofile and ./.Rprofile being the most > obvious suspects). > > That is my first thought. As for the file, I made a typo in my post. It is > indeed Rprofile.r ( r lower case). That could explain the welcome message. I finally found the culprite: /usr/lib64/R/etc/Rprofile.site :-) > > > -pd > >> >> Thank you. >> -- >> >> google.com/+arnaudgabourygabx >> >> __ >> R-devel@r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel > > -- > Peter Dalgaard, Professor, > Center for Statistics, Copenhagen Business School > Solbjerg Plads 3, 2000 Frederiksberg, Denmark > Phone: (+45)38153501 > Email: pd@cbs.dk Priv: pda...@gmail.com > > > > > > -- google.com/+arnaudgabourygabx __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] How to efficiently share data (a dataframe) between R and Java
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, the significant portion of time is spent on copying a dataframe from R to Java. The Java implementation needs access to the source dataframe. I have tested several approaches: calling Java method row-by-row; serialize the whole data-frame to a temp file and parsing in Java; or row binding to a single vector and calling a single Java method. Each approach has its limitations e.g. time-consuming row-by-row copying, serialization and parsing performance or memory limitations of a single vector. Is there an efficient approach how to copy a dataframe from R to Java and another one from Java to R? Thanks for any help you can provide... Regards, Jaroslav __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] How to efficiently share data (a dataframe) between R and Java
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 portion of time is spent on copying | a dataframe from R to Java. The Java implementation needs access to the | source dataframe. | | I have tested several approaches: calling Java method row-by-row; | serialize the whole data-frame to a temp file and parsing in Java; or | row binding to a single vector and calling a single Java method. Each | approach has its limitations e.g. time-consuming row-by-row copying, | serialization and parsing performance or memory limitations of a single | vector. | | Is there an efficient approach how to copy a dataframe from R to Java | and another one from Java to R? | | Thanks for any help you can provide... Have you looked at the gold standard that is Rserve and its dedicated clients, starting with the Java one? Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] How to efficiently share data (a dataframe) between R and Java
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, the significant portion of time is spent on copying > a dataframe from R to Java. The Java implementation needs access to the > source dataframe. > > I have tested several approaches: calling Java method row-by-row; > serialize the whole data-frame to a temp file and parsing in Java; or > row binding to a single vector and calling a single Java method. Each > approach has its limitations e.g. time-consuming row-by-row copying, > serialization and parsing performance or memory limitations of a single > vector. > > Is there an efficient approach how to copy a dataframe from R to Java > and another one from Java to R? > > Thanks for any help you can provide... > You can natively access structures on each side. The fastest way is to use R representation (column-oriented) in Java - that is much faster than any kind of serialization or anything you mention above since you pass the variables as a whole. Typically, the bottleneck are Java applications which may require very inefficient data structures. If you have control over the algorithms, you can simply use proper data structures and avoid that problem. If you don't have control, you'll have to add Java code that converts to whatever structure is needed by the Java code form the data frame pushed to the Java side. The main point here is that you do NOT want to do any conversion on the R side. Cheers, Šimon __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel