get.mod.clmns {mmodely} | R Documentation |
Get model columns
Description
Get the variable names from a model string by splitting on "+" and '~' using both 'get.mod.outcome' and 'get.mod.vars'. The results are passed to the comp.data function for eventual use in PGLS modeling. 'gn_sp' is included as it is typically required to link tree tips to rows of the comparative data.
Usage
get.mod.clmns(model, gs.clmn='gn_sp')
Arguments
model |
a model string of the form "y ~ x1 + x2 ..." |
gs.clmn |
the column header for the vector of "Genus_species" names, to link a tree tips to rows |
Value
a vector of characters enummerating the columns to retain in PGLS modeling (input to df param in the 'comp.data' function)
Examples
model.columns <- get.mod.clmns(model=formula('y ~ x1 + x2'))
[Package mmodely version 0.2.5 Index]