R/utililties.R

vars_from_label.Rd

Returns names of variables from a smooth label

vars_from_label(label)

character; a length 1 character vector containing the label of a smooth.

vars_from_label("s(x1)") #> [1] "x1" vars_from_label("t2(x1,x2,x3)") #> [1] "x1" "x2" "x3"