0

I am a Java and R beginner. My task is very simple. I want to put a value from Java to R. Then in R, sum the input value with one and pass the back to Java and display the value.

How? Can anyone help?

1 Answer 1

0

JRI is a good place to start. It provides the ability to run R inside of a java program. Once you have it downloaded you'll want to read the README as it gives installation instructions. There are some examples in the /examples folder provide with JRI that walk you through the creation of the R Engine and shows you how to do some simple tasks. I've never personally used it but this looks to be like what you're looking for.

Sign up to request clarification or add additional context in comments.

4 Comments

i do not want run R inside the java program ( because java does not have some library i use in R). Other way, is it possible i call my .R file from java ? then the R file will execute.
Could you edit your question to make it more clear what you want to do?
can java import and use the the svm or kernlab package? I has the svm and DWT code that write in R. But i use java to read the tablet, get the x and y coordinates and do some interface. The problem is how i can integrate java and R?
I still think that JRI is the way to go by the way. You basically get an R session within Java using this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.