This is a helper function that is useful when we wish to make several traits into one variable
traits.to.string(data, traits, na.action = "drop", sep = ".")
A list whose entries are
used.idx
, which indicates which rows from the original dataset were used
(may not be all of them if there is missingness); and
traits
, which has the string version of the traits
The respondent info
The names of the traits to build the model on
Defaults to 'drop' (meaning all rows of data
with any missingness on the traits are dropped). Anything else
means NA
s are treated like any other value.
The separator character used to combine values