> On Sep 5, 2016, at 13:32, Amrita Ray <[email protected]> wrote:
> 
> 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();
>           

My suspicion is twofold: one is that the r-script module isn't reporting errors 
well or at all
two is that you need to make those \ into \\: <smb://:> these are javascript 
strings, so \ is an escape character, and so to get one into the string, you 
have to double them. Otherwise they're replaced as the js is loaded either with 
nothing (if they're nonsense) or with special characters (if it happens to be 
something like \t, you get a tab.)

Aria

-- 
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/33E1BD20-904D-4C00-B293-C19A30068201%40dinhe.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to