Learn R Programming

clinCompare (version 1.0.0)

transform_variables: Transform Variables in a Dataset

Description

Applies mathematical or logical transformations to specified columns in a data frame based on a named list of transformation functions.

Usage

transform_variables(df, transformations)

Value

A data frame with transformed variables.

Arguments

df

A data frame containing the variables to be transformed.

transformations

A list of functions for transforming the variables. The names of the list should correspond to the variable names in the dataset.