I have two very simple files to test my integration setup. First the r script inside test.R:
print('hello')
Then the index.js calling that file:
var R = require("r-script");
var out = R("./test.R")
.data()
.callSync();
And this is what my console is telling me:
$ node index.js
/home/user/index.js:3
.data()
^
TypeError: Cannot read property 'data' of undefined
Currently, I am running Ubuntu 18.04 and if I run only Rscript test.R it works with no problem. Any help?