Coder Social home page Coder Social logo

jdx's People

Contributors

dbdahl avatar floidgilbert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

akshaymulik

jdx's Issues

How to share a file with java object created with jdx to Java application?

Hi,

Forgive me if this question sounds too basic, but I'm unable to properly frame my problem in google in order to get some bearings on what to do, or if I'm even doing something terribly silly.

I've produced a matrix in R which a colleague needs to use in a java application. I have already passed him the matrix as a .csv and as a .mtx file, but I'm experimenting if it's possible to send him a serialized java object which he can simply consume directly without much overhead on his end.

I went through jdx's vignette but couldn't find insights into how to actually share the objects created.

Following this, I tried the following example:

library(rJava)
library(jdx)
m <- matrix(1:9, nrow = 3, ncol = 3)
mj <- convertToJava(m)
mjs <- jserialize(mj)

But I get:

Error in jserialize(mj) : could not find function "jserialize"

My question is then, considering my R service is not currently integrated with my colleagues java application, how can I share a jclass object created with convertToJava with him?

Also, please feel free to bash me if this is a silly approach to solve this problem and if there's maybe a more efficient/traditional approach to go about this.

jdx package installation fails because rJava installation fails

From the vignette:

Install jdx with the usual command: install.packages("jdx"). This command will automatically download and install rJava if necessary. If the rJava installation fails, make sure R is configured to use Java. For Linux/OSX, use sudo R CMD javareconf. For Windows, open a command prompt "As Administrator" and execute R CMD javareconf. If there are errors after executing the command, address them, then execute the Java configuration command again. One common error can be resolved by determining whether the GNU Compiler Collection (GCC) is accessible. To check for GCC, execute gcc --help from a terminal. This command will fail if GCC is not installed or if the license agreement has not been accepted.

jdx fails to install or load with error ".onLoad failed in loadNamespace() for 'rJava'" referencing problems with rJava.so and libjvm.dylib

jdx fails to install or load due to an rJava error similar to the one below.

Error: package or namespace load failed for ‘rJava’:
.onLoad failed in loadNamespace() for 'rJava', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so, 6): Library not loaded: rpath/libjvm.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.4/Resources/library/rJava/libs/rJava.so
Reason: image not found

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.