View source: R/treeplyr_functions.R
forceFactor | R Documentation |
This function can be used to check if a treedata object contains factors and, if desired, convert all columns automatically to factors.
forceFactor(tdObject, return.factor = TRUE)
tdObject |
A |
return.factor |
If TRUE, then a treedata object with all factors will be returned;
columns will be forced into factors using |
If return.factor, then an object of class "treedata
" with all columns as
factors.
data(anolis) td <- make.treedata(anolis$phy, anolis$dat) tdforcefactor <- forceFactor(td)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.