add_factor_info: Add Factor-specific Attributes to a Data Frame

View source: R/add_factor_info.R

add_factor_infoR Documentation

Add Factor-specific Attributes to a Data Frame

Description

add_factor_info searches a data.frame for labelr-specific factor meta-data, which it records and retains for future use. It is used by other labelr functions and need not be used directly by labelr end users.

Usage

add_factor_info(data)

Arguments

data

the data.frame to which you wish to add labelr-specific factor variable meta-data attributes (if any factors are present).

Value

a data.frame.

Examples

# this function does not strictly require prior or other use of labelr
ir2 <- add_factor_info(iris)
mt2 <- add_factor_info(mtcars)
get_factor_info(mtcars) # none
get_factor_info(iris) # none
get_factor_info(mt2) # none
get_factor_info(ir2) # some!

labelr documentation built on Sept. 11, 2024, 9:05 p.m.