I have an existing Javascript/HTML Application. I wanted to use power of R Programming
's scientific computing and graphics.
My aim is to,
- Send some data from Javascript app.
- Call predefined R functions with the data input.
- Get the output get the output in the form of both text and graphics.
- Display it in the HTML page.
How to achieve this,
Should I run R continuously, use something like
web sockets
and connect to R? If doing How to pass R scripts to execute and get the output pack?There is Rserve. There are some
nodeJS
implementation forRserve
. But problem with this is, each line of code should be passed through theevaluate
commands. Even though if I do so, how to handle the graph output?I explored a bit of openCPU. If using openCPU R package, R should be continuously Running with
opencpu
library and each we start R and openCPU, it starts with different port number. And if i close the R session,opencpu
server also terminates.If I install standalone
opencpu
server in my machine, how to use R with this? I've installed openCPU standalone server and a kind of stuck after that.
How should I proceed, What should I do to accomplish my task. I'm like a kind of don't know which direction to go. Please throw some light on this. I'm sure most people would need this.
I have worked with shiny
, but in this case, I can not make use of it. Need to connect R from external Web Application.
.R
file that will find the data. – Vergeboard