data_frame_to_json: Data frame to JSON

View source: R/utils-mongodb.R

data_frame_to_jsonR Documentation

Data frame to JSON

Description

To write objects to a mongoDB, they need to be in JSON format. This function converts data from a data frame to a JSON

Usage

data_frame_to_json(data_to_change)

Arguments

data_to_change

The data frame that needs to be converted

Details

Rpackage file: utils-mongodb.R

Value

A JSON string

Examples

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)


l-gorman/rhomis-R-package documentation built on Nov. 8, 2023, 6:46 a.m.