check_trait_type: Check trait type specification

View source: R/manifest_trait_metadata.R

check_trait_typeR Documentation

Check trait type specification

Description

Check that specified trait type metadata matches the dataframe of manifest traits. This provides a non-exhaustive series of checks.

Usage

check_trait_type(manifest_trait, name, type, levels)

Arguments

manifest_trait

Variable(s) from a daframe. The manifest trait recordings to be checked.

name

A character scalar. The name of the trait to be checked.

type

A caracter scalar. One of c("ord", "nom", "con", "fvt"). The type of trait to be checked.

levels

A scalar. The number of levels associated with a discrete manifest trait. NA when traits are continuous.

Value

If the conditions are not met then returns an error message.


jpmeagher/vbar documentation built on Nov. 22, 2022, 5:48 a.m.