Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

217
Views
Error in sending json data from nodejs to r using r-integration

I'm currently using NodeJS and using r-integration. I'm trying to send this sample JSON

var jsonobj={"month": "january", "totalrevenue": 1000000}

from nodejs to Rstudio by R.callMethod.

In R.file,

library(rjson)
library(plyr)
x = function(data) {
  sample <- rjson::fromJSON(data)
  return (ex)
}

where data is the jsonobj.

The function just returns the JSON data as a complete string as supposed to how it is. Given below is how the output is in node js.

[ '{month:august,totalrevenue:78841814.37}' ]

The code gives me the following error

Error in rjson::fromJSON(data) : not all data was parsed (0 chars were parsed out of a total of 39 chars)

How can I fetch the JSON back from R exactly as it is passed from NodeJS?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!