should_factor_stay_factor: Should this really be a factor?

Description Usage Arguments Value Examples

Description

Should this really be a factor?

Usage

1

Arguments

x

factor

Value

boolean; TRUE if the number of unique values does not equal to the length, and FALSE otherwise.

Examples

1
2
3
4
5
6
7
8
abb <- factor(c("a", "b", "b"))
abc <- factor(c("a", "b", "c"))

# This should be a factor:
should_factor_stay_factor(abb)

# This should not be a factor
should_factor_stay_factor(abc)

csiu/foofactor documentation built on May 14, 2019, 12:24 p.m.