units: Reclassify specified columns as units or list unit columns in...

View source: R/qedata_define.R

unitsR Documentation

Reclassify specified columns as units or list unit columns in a data.table

Description

This function reclassifies specified columns of a data.table to the 'qe.unit' format if column names are provided. If no column names are provided, it returns the names of columns that are already classified as 'qe.unit'.

Usage

units(x, ...)

Arguments

x

A data.table. The data.table containing the columns to be reclassified or checked.

...

Additional arguments specifying the names of the columns to be reclassified.

Value

The modified data.table with specified columns reclassified as 'qe.unit', or a character vector of column names already classified as 'qe.unit'.

Examples

library(data.table)
dt <- data.table(a = 1:5, b = 6:10)
# Reclassify columns 'a' and 'b' as 'qe.unit'
dt <- units(dt, "a", "b")
# List columns classified as 'qe.unit'
unit_columns <- units(dt)

rENA documentation built on Nov. 5, 2025, 5:50 p.m.

Related to units in rENA...