forceNumeric: Function for checking whether a treedata object contains only...

Description Usage Arguments Value Examples

View source: R/treeplyr_functions.R

Description

This function can be used to check if a treedata object contains numeric columns and, if desired, drop all non-numeric columns.

Usage

1
forceNumeric(tdObject, return.numeric = TRUE)

Arguments

tdObject

A treedata object

return.numeric

If TRUE, then a treedata object with all numeric columns will be returned; non-numeric columns will be removed.

Value

If return.numeric, then an object of class "treedata" with only numeric columns.

Examples

1
2
3
data(anolis)
td <- make.treedata(anolis$phy, anolis$dat)
tdnumeric <- forceNumeric(td)

treeplyr documentation built on Sept. 17, 2020, 5:07 p.m.