f_detect: Detect factors that should be character or not

Description Usage Arguments Value Examples

View source: R/f_detect.R

Description

Detect factors that should be character because # unique values = length

Usage

1

Arguments

x

a factor.

Value

boolean Returns TRUE if # unique values = length An error is raised if # unique values != length

Examples

1
2
fdetect(factor(c("a", "b", "c","a"))) # FALSE
f_detect(factor(c("a", "b", "c", "d"))) # TRUE

STAT545-UBC-students/hw07-ziqiangt documentation built on May 24, 2019, 7:53 a.m.