powered by
Repairs a terms vector.
repair_terms(x)
The object.
The repaired term vector.
Invalid elements are replaced by missing values and spaces removed.
If a parameter such as b is a scalar then b[1] is replaced by b but if higher indices are included such as b[2] then b is replaced by b[1].
b
b[1]
b[2]
term-vector() and valid_term()
term-vector()
valid_term()
# NOT RUN { repair_terms(as.term(c("b[3]", "b"))) repair_terms(as.term(c("a[3]", "b[1]"))) repair_terms(as.term(c("a [3]", " b [ 1 ] "))) repair_terms(as.term(c("a", NA))) # }
Run the code above in your browser using DataLab