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: 0x555acb1e6f58>
#> <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: 0x555ac90512a8>
#> <environment: namespace:wddsWizard>
#>
#> $descriptions
#> function (x)
#> {
#> prep_array_objects(x)
#> }
#> <bytecode: 0x555accad1d20>
#> <environment: namespace:wddsWizard>
#>
#> $fundingReferences
#> function (x)
#> {
#> prep_array_objects(x)
#> }
#> <bytecode: 0x555acb1e6740>
#> <environment: namespace:wddsWizard>
#>
#> $identifier
#> function (x)
#> {
#> prep_array_objects(x)
#> }
#> <bytecode: 0x555acb1e5f98>
#> <environment: namespace:wddsWizard>
#>
#> $relatedIdentifiers
#> function (x)
#> {
#> prep_array_objects(x)
#> }
#> <bytecode: 0x555acb1e9620>
#> <environment: namespace:wddsWizard>
#>
#> $language
#> function (x)
#> {
#> prep_atomic(x)
#> }
#> <bytecode: 0x555acb1e8e78>
#> <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: 0x555acb1e86d0>
#> <environment: namespace:wddsWizard>
#>
#> $publicationYear
#> function (x)
#> {
#> prep_atomic(x)
#> }
#> <bytecode: 0x555acb1eae78>
#> <environment: namespace:wddsWizard>
#>
#> $rights
#> function (x)
#> {
#> prep_array_objects(x)
#> }
#> <bytecode: 0x555acb1ea6d0>
#> <environment: namespace:wddsWizard>
#>
#> $subjects
#> function (x)
#> {
#> prep_array_objects(x)
#> }
#> <bytecode: 0x555acb1e9f28>
#> <environment: namespace:wddsWizard>
#>
#> $titles
#> function (x)
#> {
#> prep_array_objects(x)
#> }
#> <bytecode: 0x555acb1ed5b0>
#> <environment: namespace:wddsWizard>
#>