Tests whether an object is an era definition (an era
object).
is_era()
tests whether the object inherits from the S3 class era_yr
.
is_valid_era()
performs additional checks to determine whether the object
is well-formed (see details).
validate_era()
throws an informative error message for invalid yr
s.
Value
is_era()
and is_valid_era()
return TRUE
or FALSE
.
validate_era()
returns x
invisibly, and is used for its side-effect of
throwing an informative error for invalid objects.
Details
Valid era
objects:
Must have all parameters set and not NA
Must have a character
label
parameterMust have a numeric
epoch
parameterMust have a character
name
parameterMust have a character
unit
parameter that is one of the defined unitsMust have a positive, integer
scale
parameterMust have a direction parameter that is -1 (backwards) or 1 (forwards)
See also
Other era helper functions:
era
,
era_parameters
,
era_year
,
era_year_parameters
,
is_era_year()
,
is_yr()
,
this_year()