Use this function to quickly construct a term object
from a character vector, without checking the input.
Use term()
to repair the input.
new_term(x = character())
new_term()
#> <term[0]>
new_term(c("a", "b[1]", "b[2]"))
#> <term[3]>
#> [1] a b[1] b[2]
# Terms are not checked for validity:
new_term("r[")
#> <term[1]>
#> [1] r[
repair_terms(new_term("r["))
#> <term[1]>
#> [1] <NA>