Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get the output back to NodeJS #13

Open
tnvrsingh opened this issue Oct 30, 2017 · 2 comments
Open

How to get the output back to NodeJS #13

tnvrsingh opened this issue Oct 30, 2017 · 2 comments

Comments

@tnvrsingh
Copy link

Say that my R script returns a single value. How am I supposed to get it back from R to my Node Application?

@wilau2
Copy link

wilau2 commented Oct 31, 2017

In my use case, im redirecting the output to a file, than reading it from node
R file

write(jsonscore, file = paste0( "path/",  "myResult.json"))
 const rolefitResult = require('path/myResult.json');

@letrape
Copy link

letrape commented Nov 12, 2017

The last line of your R file is returned to the parent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants