ensure_slot_columns: Ensure variable/level slot columns exist

View source: R/slot_helpers.R

ensure_slot_columnsR Documentation

Ensure variable/level slot columns exist

Description

Ensure variable/level slot columns exist

Usage

ensure_slot_columns(x, max_vars = 12)

Arguments

x

Data frame.

max_vars

Number of variable/level slots.

Value

A data frame containing the original columns in x plus any missing variable and level slot columns.

Examples

factors <- data.frame(
  term_name = "territory",
  term_value = 1.10
)

factors <- ensure_slot_columns(
  factors,
  max_vars = 2
)

factors

ratingtables documentation built on Sept. 6, 2026, 1:06 a.m.