Learn R Programming

JointAI (version 1.1.0)

factor_to_integer: Convert a factor to an integer representation

Description

Convert a factor to an integer representation

Usage

factor_to_integer(x)

Value

An integer vector when x is a factor, otherwise the original x.

Arguments

x

a vector. If x is a factor it will be converted to integers as described below; otherwise x is returned unchanged.