View source: R/utils-mongodb.R
data_frame_to_json | R Documentation |
To write objects to a mongoDB, they need to be in JSON format. This function converts data from a data frame to a JSON
data_frame_to_json(data_to_change)
data_to_change |
The data frame that needs to be converted |
Rpackage file: utils-mongodb.R
A JSON string
sample_data_frame <- tibble::as_tibble(list(
"original_spelling" = c("benana", "maz", "wetermalon", "cokonut"),
"standardised_spelling" = c("benana", NA, "wetermalon", "cokonut")
))
data_frame_to_json(sample_data_frame)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.