I could of course solve this downstream in R, but I think that would be messier compared to just get rjson to do it for me somehow. Can it be done?
Two ideas:
RJSONIO
instead, and use its fromJSON
. The argument to look for is nullValue
, which you can set to be NA. I switched from rjson to RJSONIO a long time ago, after doing some speed tests and it also produces somewhat more readable JSON.gsub()
. This isn't particularly robust if you aren't familiar with regular expressions (if "null" is part of a bit of text, you could end up dropping it, so it's important to be careful).If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With