tct_drop: Drop unused levels

Description Usage Arguments Examples

Description

Compared to base::droplevels(), does not drop NA levels that have values.

Usage

1
tct_drop(x, only)

Arguments

x

a tct_tree.

only

A character vector restricting the set of levels to be dropped. If supplied, only levels that have no entries and appear in this vector will be removed.

Examples

1
2
3
c("Kyle", "John", "Molly") %>%
  tct_tree() %>%
  tct_drop("Kyle")

bocinsky/treecats documentation built on May 25, 2019, 3:24 p.m.