fix_dating: Reduce the Dating-list to _min_/_max_-Values

View source: R/simplify_utilities.R

fix_datingR Documentation

Reduce the Dating-list to min/max-Values

Description

Reformats the "dating"-list of any resource from an idaifield_docs- or idaifield_resources-list to contain min and max dating and additional info as well as the original values in the "comment"-element.

Usage

fix_dating(dat_list, use_exact_dates = FALSE)

Arguments

dat_list

A "dating"-list of any resource from an idaifield_docs- or idaifield_resources-list.

use_exact_dates

TRUE/FALSE: If TRUE and "exact" dating type is present, sets the min and max dating to the value of the exact dating. Default is FALSE.

Value

A reformatted list containing min and max dating and additional information as well as all original values in the "comment"-element. If use_exact_dates = TRUE contains the value of the exact dating in both dating.min and dating.max.

See Also

  • This function is used by: simplify_idaifield()

Examples

## Not run: 
dat_list <- list(list(type = "range",
                     begin = list(inputYear = 2000, inputType = "bce"),
                     end = list(inputYear = 2000, inputType = "ce")),
                list(type = "exact",
                     begin = list(inputYear = 130, inputType = "bce"),
                     end = list(inputYear = 130, inputType = "bce")))
# Use the true min/max dating:
fix_dating(dat_list)
# use the available exact dating:
fix_dating(dat_list, use_exact_dates = TRUE)

## End(Not run)

lsteinmann/idaifieldR documentation built on April 3, 2025, 2:06 p.m.