is_era {era}R Documentation

Validation functions for era objects

Description

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 yrs.

Usage

is_era(x)

validate_era(x)

is_valid_era(x)

Arguments

x

Object to test.

Details

Valid era objects:

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.

See Also

Other era helper functions: era_parameters, era_year_parameters, era_year, era, is_era_year(), is_yr(), this_year()


[Package era version 0.4.1 Index]