factorize: Convert any vector into a factor.

Description Usage Arguments Value

View source: R/conversions.R

Description

Convert any vector into a factor.

Usage

1
factorize(column, levels, labels, ordered = F)

Arguments

column

A vector to convert into a factor.

levels

A vector of levels to accept (optional). In the case of a labelled object, this input is completely ignored since levels come from the value labels defined in the labelled object.

labels

A vector of labels for the levels (optional). Similarly ignored in the case of a labelled object.

ordered

A boolean indicating whether factor is ordered (optional). If levels are specified, it uses the given ordering. If not, uses the order it encounters values in the vector.

Value

A native R factor, either unordered or ordered.


scottriding/y2pareto documentation built on May 29, 2019, 9:32 a.m.