A matrix with variables converted or, if weight == TRUE or a vector, a list also with weights.
Arguments
trait
A species x traits matrix or data.frame.
convert
A vector of column numbers, usually categorical variables, to be converted to dummy variables.
weight
Indicates whether weights of variables should be returned (TRUE/FALSE) or a vector with weights per variable.
Details
If convert is given the algorithm will convert these column numbers to dummy variables. Otherwise it will convert all columns with factors or characters.