Learn R Programming

term (version 0.3.5)

repair_terms: Repair Terms

Description

Repairs a terms vector.

Usage

repair_terms(x, normalize = TRUE)

Value

The repaired term vector.

Arguments

x

The object.

normalize

A flag specifying whether to normalize terms.

Details

Invalid elements are replaced by missing values and spaces removed.

See Also

term-vector(), valid_term() and normalize_terms()

Examples

Run this code
repair_terms(new_term(c("b[3]", "b")))
repair_terms(new_term(c("a[3]", "b[1]")))
repair_terms(new_term(c("a [3]", " b [ 1  ] ")))
repair_terms(new_term(c("a", NA)))

Run the code above in your browser using DataLab