term_new: Template for Creating New Term

View source: R/S03_Utilities.R

term_newR Documentation

Template for Creating New Term

Description

Function to help format input to the term_prep function. Initializes the sublist with the parameters for creating a new term based on an existing variable in a data frame.

Usage

term_new(
  label = "",
  coding = NULL,
  transformation = NULL,
  range = NULL,
  scale = NULL,
  order = NULL
)

Arguments

label

An optional label for the new term.

coding

A list with the parameters for recoding the base variable (see term_coding).

transformation

A character string with an R expression for transforming the base variable.

range

A vector with the range for the term.

scale

Either a logical value, or a named vector of the form c(m = ..., sd = ...) for standardizing the term.

order

A character vector that can be used to specify the order in which coding ('c'), transformations ('t'), and scaling ('s') are done.

Value

A list.


rettopnivek/arfpam documentation built on Oct. 20, 2024, 7:24 p.m.