Luis Miguel Agudo Bravo
GIS Developer
In oceanography and fisheries we have a lot of scripts developed with R.
Shiny Server is useful not only for hosting Shiny applications, but also for hosting interactive R markdown documents.
By setting up Shiny Server, we are able to host Shiny applications and interactive R documents on the web in a way that is accessible to the public.
- NPM packagge
- An interface for node.js to statistical programming language R
To retrieve an object from the R session, we use the get command. For example, let us create a 2x2 matrix in R and retrieve it in JavaScript as a nested array:
R.parseEvalQ("mat = matrix(1:4,ncol=2,nrow=2)");
var mat = R.get('mat');
Internally, the get function uses JSON in order to convert the R data types to JavaScript data types.
2. Execute R as external program from within node.js:
var exec = require('child_process').exec;
exec('R', function callback(error, stdout, stderr){
// result
});
- We want to use the child_process module
By Luis Miguel Agudo Bravo