Skip to contents

A convenience function for those who used the metadata template to create their project metadata data.

Usage

prep_from_metadata_template(
  project_metadata,
  prep_methods_list = prep_methods(),
  schema_properties = wddsWizard::schema_properties,
  json_prep = TRUE
)

Arguments

project_metadata

Data frame. Should correspond to the structure of the project_metadata_template.csv

prep_methods_list

list. Named list of methods where each items is a function to applied to corresponding items in x.Default is prep_methods().

schema_properties

Data frame. A data frame of schema properties and their types.

json_prep

Logical. Should the metadata be prepped for JSON?

Value

Named list ready to be converted to json

Details

Does some light data formatting to make conversion to json easier.

Examples

if (FALSE) { # \dontrun{
# create
wddsWizard::use_template("project_metadata_template.csv",
  folder = "data",
  file_name = "my_project_metadata.csv"
)
project_metadata <- read.csv("data/my_project_metadata.csv")

prepped_project_metadata <- wddsWizard::prep_from_metadata_template(project_metadata)

project_metadat_json <- jsonlite::toJSON(prepped_project_metadata, pretty = TRUE)
} # }