How to convert that to a json object in R package jsonlite?
the problem is I want to use an R function that expects a JSON object as argument. And I find myself doing toJSON(fromJSON(jsonStr))
every time I want to pass a JSON string just to change it's class to json.
jsonStr <- '{"radius": 200, "color": "blue"}'
r2d3(data = as_d3_data(toJSON(fromJSON(jsonStr))),script = 'whatever.js')