detect_factor_be_character: Detect factors that should be character or not?

Description Usage Arguments Value Examples

View source: R/detect_factor_be_character.R

Description

Detect factors that should be character or not?

Usage

1

Arguments

x

factor

Value

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

Examples

1
2
3
4
5
6
7
8
factor1 <- factor(c("1", "2", "3"))
factor2 <- factor(c("apple", "pear", "banana"))

# This is a character:
detect_factor_be_character(factor1)

# This is a character
detect_factor_be_character(factor2)

yanchaoluo/foofactors documentation built on May 18, 2019, 9:15 p.m.