factor_column: Turn column to factor by reference

View source: R/data.table.R

factor_columnR Documentation

Turn column to factor by reference

Description

Preserves attribute "label" of the column if it exists

Usage

factor_column(dt, column_name)

Arguments

dt

data.table source string to extract date from

Examples

dt <- data.table(id=c("A", "A", "B"), value=c(1, 2, 3))
factor_column(dt, "id")


fcocquemas/hfty.helpers documentation built on Feb. 13, 2023, 7:25 a.m.