2

The Rcaller 2.0 generated plot is rendering an empty output and the file (png) generated is also empty? posting the link for the code i have used

http://stdioe.blogspot.in/2011/07/rcaller-20-calling-r-from-java.html

I used the code in the link specified above and the application runs fine but the output is a blank console without any graph plotted. It also creates a png file which is empty. am i missing something or are there any steps to be followed to eliminate the problem i am facing.

Thanks in advance..

jbytecode
  • 681
  • 12
  • 29
sundeep
  • 601
  • 1
  • 8
  • 21
  • 1
    Please shorten your title and expand your question. Linking to an external site for your question does not make the question and its answers self contained on StackOverflow. – Paul Hiemstra Apr 22 '12 at 11:32
  • The Rcaller 2.0 generated plot is rendering an empty output and the file (png) generated is also empty? the link for the code i have used is http://stdioe.blogspot.in/2011/07/rcaller-20-calling-r-from-java.html – sundeep Apr 22 '12 at 12:00
  • Reiterating your question does not change my comment... – Paul Hiemstra Apr 22 '12 at 12:18
  • Hii i got the output. **solution:** The work around i did was to install rjava in my R environment. It solved the problem. i think the rjava is required to be installed in your R environment even though you import the rcaller jar file. I perceived it as the R caller would just call the R environment but your R environment must have the rjava to do the rest of the work. If i am wrong please correct and a better explanation is welcomed... – sundeep Apr 22 '12 at 14:52
  • i am new to stack overflow and i am new to certain standards you follow here so please bear with me for a few days so that i get used to things the way most of the users do here.... – sundeep Apr 22 '12 at 14:54
  • Thanks for your effort. Next time try and make the question self contained, even if that copying code from the website you llinked. – Paul Hiemstra Apr 22 '12 at 15:04

2 Answers2

1

Hii i got the output.

solution: The work around i did was to install rjava in my R environment. It solved the problem.

I think the rjava is required to be installed in your R environment even though you import the rcaller jar file.

I perceived it as the R caller would just call the R environment but your R environment must have the rjava to do the rest of the work.

If i am wrong please correct and a better explanation is welcomed...

sundeep
  • 601
  • 1
  • 8
  • 21
0

rJava and RCaller are separate projects and you don't need to have rJava installed in order to use RCaller.

Only the R Package Runiversal is required and used by RCaller. Type

install.packages("Runiversal")

in R REPL and press enter before running RCaller. This is what you need.

If the generated R Code is invalid, RCaller will not handle the output or generated plots. You can also have a look at the generated code and output files in your os' temp directory.

jbytecode
  • 681
  • 12
  • 29
  • 1
    Hey i tried the same initially but the code didn't give me the proper output. – sundeep May 29 '12 at 08:13
  • thanks for the reply but can you be more explanatory. i understand that rcaller just converts the java code into r code and receives the output generated by R and handles the output. i din't get what is the REPL got to do with this??? can you please explain that... – sundeep May 29 '12 at 09:23