We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I've starting using this library for an android speed detection app wich requires to process the data with R.
I am exposing the result data trought an API, so the app can use the result.
Well first I have faced several problems to run my algorithm within Node.js some solutions was:
2)Check if Rscript is in the path and check if the lib folder for installing packages has write permissions in order to use Needs
Well finally I've get stucked on an error from node
ERROR:
unexpected string in json at position 4
It was because the return of the launch.R file was [1] "[35.636]" , where 35.363 is the result of my R algorithm.
I've tried with other results such as data frames and the result was the same [1] "[x1][x2]..."
The problem is that the double quotes are not a valid JSON format
then after hours of thinking, I've decided to call cat( ) function in the Launch.R file and all my problems gone
Replacing this line
do.call(toJSON, .e$out)
with:
output <- do.call(toJSON, .e$out) cat(output) My question is:
My workaround is correct? or Im missing something ?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I've starting using this library for an android speed detection app wich requires to process the data with R.
I am exposing the result data trought an API, so the app can use the result.
Well first I have faced several problems to run my algorithm within Node.js some solutions was:
2)Check if Rscript is in the path and check if the lib folder for installing packages has write permissions in order to use Needs
Well finally I've get stucked on an error from node
ERROR:
unexpected string in json at position 4
It was because the return of the launch.R file was [1] "[35.636]" , where 35.363 is the result of my R algorithm.
I've tried with other results such as data frames and the result was the same [1] "[x1][x2]..."
The problem is that the double quotes are not a valid JSON format
then after hours of thinking, I've decided to call cat( ) function in the Launch.R file and all my problems gone
Replacing this line
do.call(toJSON, .e$out)
with:
output <- do.call(toJSON, .e$out)
cat(output)
My question is:
My workaround is correct? or Im missing something ?
The text was updated successfully, but these errors were encountered: