Collection of methods for preparing data conveniently named to make preparing easier
See also
Other JSON Prep:
clean_field_names(),
get_entity(),
prep_affiliation(),
prep_array(),
prep_array_objects(),
prep_atomic(),
prep_creators(),
prep_data(),
prep_descriptions(),
prep_for_json(),
prep_from_metadata_template(),
prep_fundingReferences(),
prep_identifier(),
prep_language(),
prep_methodology(),
prep_nameIdentifiers(),
prep_object(),
prep_publicationYear(),
prep_relatedIdentifiers(),
prep_rights(),
prep_subjects(),
prep_titles()
Examples
prep_methods()
#> $data
#> function (x)
#> {
#> prep_object(x)
#> }
#> <bytecode: 0x562a1a621be0>
#> <environment: namespace:wddsWizard>
#>
#> $creators
#> function (x)
#> {
#> assertthat::assert_that(is.list(x), msg = "x must be a list")
#> x_aff <- purrr::map(x, prep_affiliation)
#> x_nid <- purrr::map(x_aff, prep_nameIdentifiers)
#> out <- prep_array_objects(x_nid)
#> return(out)
#> }
#> <bytecode: 0x562a1c614cd0>
#> <environment: namespace:wddsWizard>
#>
#> $descriptions
#> function (x)
#> {
#> prep_array_objects(x)
#> }
#> <bytecode: 0x562a1724fa40>
#> <environment: namespace:wddsWizard>
#>
#> $fundingReferences
#> function (x)
#> {
#> prep_array_objects(x)
#> }
#> <bytecode: 0x562a1a622430>
#> <environment: namespace:wddsWizard>
#>
#> $identifier
#> function (x)
#> {
#> prep_array_objects(x)
#> }
#> <bytecode: 0x562a1a61eda8>
#> <environment: namespace:wddsWizard>
#>
#> $relatedIdentifiers
#> function (x)
#> {
#> prep_array_objects(x)
#> }
#> <bytecode: 0x562a1a61f588>
#> <environment: namespace:wddsWizard>
#>
#> $language
#> function (x)
#> {
#> prep_atomic(x)
#> }
#> <bytecode: 0x562a1a61fd68>
#> <environment: namespace:wddsWizard>
#>
#> $methodology
#> function (x)
#> {
#> assertthat::assert_that(is.list(x), msg = "x must be a list")
#> check_for_names <- c("eventBased", "archival") %in% names(x)
#> assertthat::assert_that(all(check_for_names), msg = "x must have items `eventBased` and `archival`")
#> x <- dplyr::mutate(x, eventBased = as.logical(.data$eventBased),
#> archival = as.logical(.data$archival))
#> prep_object(x, unbox = TRUE)
#> }
#> <bytecode: 0x562a1a620510>
#> <environment: namespace:wddsWizard>
#>
#> $publicationYear
#> function (x)
#> {
#> prep_atomic(x)
#> }
#> <bytecode: 0x562a1a61e778>
#> <environment: namespace:wddsWizard>
#>
#> $rights
#> function (x)
#> {
#> prep_array_objects(x)
#> }
#> <bytecode: 0x562a1a61b3c8>
#> <environment: namespace:wddsWizard>
#>
#> $subjects
#> function (x)
#> {
#> prep_array_objects(x)
#> }
#> <bytecode: 0x562a1a61be48>
#> <environment: namespace:wddsWizard>
#>
#> $titles
#> function (x)
#> {
#> prep_array_objects(x)
#> }
#> <bytecode: 0x562a1a61c5f0>
#> <environment: namespace:wddsWizard>
#>