get_valid_xref: Derive a valid cross-reference identifier

View source: R/helpers.R

get_valid_xrefR Documentation

Derive a valid cross-reference identifier

Description

Validate an xref provided explicitly or implicitly (through the active record).

Usage

get_valid_xref(gedcom, xref, record_type, record_type_fn)

Arguments

gedcom

A tidyged object.

xref

A record xref.

record_type

A character string describing the record type. Generally one of the global record_string_* values.

record_type_fn

A function to check the record type. Generally one of the is_* functions.

Details

This helper function is designed to derive and run validation checks on an xref provided explicitly or implicitly. An xref is provided implicitly through the active record of the tidyged object.

Once found, the xref is checked to ensure it is of the appropriate type.

Value

A valid xref identifier.


jl5000/tidygedcom documentation built on June 22, 2022, 5:16 p.m.