This is a basic JSON RPC call to OpenCPU. We use $ocpu.rpc from the
angular-ocpu.js library to call the R function called hello
included in the appdemo R package.
Have a look at the HTML source code! Some things to notice:
We can always see the source code of the R function using the API, e.g
here.
If the R function has a manual page, it we can find it here
When the name field is empty, the R function raises an error. Notice how we deal with this in javascript.