fct_to_int_cpp: Convert Factor to Integer (C++ Version)

View source: R/RcppExports.R

fct_to_int_cppR Documentation

Convert Factor to Integer (C++ Version)

Description

This function converts a factor (an integer vector with a "levels" attribute) to its underlying integer representation by stripping away the factor's levels and class attributes. By default, the function does not modify the input by reference (a copy is made), but if 'inplace' is set to 'true', the function will modify the input directly.

Usage

fct_to_int_cpp(x, inplace = FALSE)

Arguments

x

A factor object.

inplace

Logical flag indicating whether to modify the input in place (default: false).

Value

An integer vector containing the underlying integer codes without factor attributes.


ChristK/CKutils documentation built on April 11, 2025, 10:11 p.m.