I am facing the same problem. Does anybody found a solution ?
Le lundi 5 septembre 2016 21:19:30 UTC+2, Amrita Ray a écrit :
>
> I am trying to call some R scripts from nodejs. I found out from the net
> that a simple npm module called r-script is all I need to do this. I
> installed it and then wrote this simple program.
>
> var R = require("r-script");
> var out = R("C:\Users\IBM_ADMIN\Documents\Amrita-Documents\BAT Pricing
> Analytics\a-test.R")
> .data(10)
> .callSync();
>
> console.log(out);
>
> The R script a-test.R looks like this.
>
> Square <- function(input) {
> return(input^2)
> }
>
> res <-Square(3)
> print(res)
>
> I have tried this dozens of times but getting the same output.
>
> C:\Users\IBM_ADMIN\Documents\Amrita-Documents\NodeJS\My Sample Codes>node
> r-code
> .js
> null
>
> Can anyone please help?
>
--
Job board: http://jobs.nodejs.org/
New group rules:
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/nodejs/97c3b82b-8cf9-42aa-aff4-6ab56f1a3b4e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.