Description Usage Arguments Value Examples
This function turns NULL
in a list into character "NA", which
can be very useful when processing JSON data that has null
values.
1 | null2na(x)
|
x |
A list |
If any element from the input list is NULL, they will be turned into character "NA". Otherwise, return the original list.
1 2 3 4 5 6 7 8 | ## Not run:
result <- mysql_read("SELECT userAgent FROM ...", "log")
ua <- purrr::map_df(
result$userAgent,
~ null2na(jsonlite::fromJSON(.x, simplifyVector = FALSE))
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.