Skip to contents

Converts characters to factors

Usage

char2fact(x, n = 5)

# S3 method for default
char2fact(x, n = 5)

# S3 method for character
char2fact(x, n = 5)

# S3 method for factor
char2fact(x, n = 5)

# S3 method for data.frame
char2fact(x, n = 5)

Arguments

x

A vector of characters

n

The limit to the number of unique values for the factor

See also