Skip to contents

A function to transform numeric and character columns in a barn object into new factor columns. It appends "_num" for numeric columns, "_cat" for character columns, and renames both to factors. Original columns are deleted from the combined data frame within the barn object.

Usage

plant_new_numeric_factors(
  barn_obj,
  numeric_suffx = "_num",
  nominal_suffix = "_cat"
)

Arguments

barn_obj

A barn object, created by barn().

numeric_suffx

The suffix for new numeric factor columns. Default is "_num".

nominal_suffix

The suffix for new nominal factor columns. Default is "_cat".

Value

The modified barn_obj with the transformed combined data frame.