valid_term: Test Valid Terms

View source: R/valid-term.R

valid_termR Documentation

Test Valid Terms

Description

Test whether each element in a term or term_rcrd object is valid.

Usage

valid_term(x)

Arguments

x

The object.

Details

Repairing a term vector replaces invalid terms with missing values.

Value

A logical vector indicating whether each term is valid.

See Also

term-vector() and repair_terms()

Other valid: vld_term()

Examples

# valid term elements
valid_term(term("a", "a [3]", " b [ 1  ] ", "c[1,300,10]"))
# invalid term elements
valid_term(new_term(c("a b", "a[1]b", "a[0]", "b[1,]", "c[]", "d[1][2]")))

term documentation built on Sept. 29, 2022, 5:14 p.m.