Learn R Programming

term (version 0.1.0)

valid_term: Valid Terms

Description

Test whether each element in a term vector is valid.

Usage

valid_term(x)

Arguments

x

The object.

Value

A logical vector indicating whether each term is valid.

Details

Repairing a term vector replaces invalid terms with a missing value.

See Also

term-vector() and repair_terms()

Examples

Run this code
# NOT RUN {
# valid term elements
valid_term(as.term(c("a", "a [3]", " b [ 1  ] ", "c[1,300,10]")))
# invalid term elements
valid_term(as.term(c("a b", "a[1]b", "a[0]", "b[1,]", "c[]", "d[1][2]")))
# }

Run the code above in your browser using DataLab