inst/examples/NA_JSON.R

xi = 1:3
xi[[2]] = NA
toJSON(xi) # uses "NA"
xiNull <- "[ 1, null, 3]"
## xiNULL and toJSON(xi) produce the same result
identical(xi, fromJSON(xiNull))
# null is already used for string NA's
xc = c("NA", "NB", NA)
toJSON(xc)

Try the XR package in your browser

Any scripts or data that you put into this service are public.

XR documentation built on May 2, 2019, 6:01 a.m.