Description Usage Arguments Value Note Examples
Fix jsonlite's JSON simplification.
1 | simplify_homogeneous_lists(object, simple_check = TRUE)
|
object |
any R object derived from |
simple_check |
logical. This is needed to modify behavior for recursive function call. |
the same object, with any list components where each element is an atomic vector of length 1 or NULL coerced to a single atomic vector.
See https://github.com/jeroenooms/jsonlite/issues/66 for more details.
1 2 3 4 5 6 7 8 | ## Not run:
simplify_homogeneous_lists(jsonlite::fromJSON(
'{ "numeric": [1,2], "list": [1, "a"] }', simplifyVector = FALSE))
# A list with atomic numeric vector in the "numeric" key and
# a list in the "list" key.
# list(numeric = c(1,2), list = list(1, "a"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.