Learn R Programming

stratifiedyh (version 0.1.0)

custom_transform: Apply Custom Transformation to Data Column

Description

This function allows the user to apply a custom transformation (scaling, normalization, log transform, or custom function) to a specified numeric column.

Usage

custom_transform(df, selected_column, transformation_type)

Value

A data frame with the transformed column.

Arguments

df

A data frame containing the data.

selected_column

A character string specifying the column to be transformed.

transformation_type

A character string representing the transformation type: "scale", "normalize", "log", or a custom R function.

Examples

Run this code
result <- custom_transform(iris, selected_column = "Sepal.Length", transformation_type = "scale")

Run the code above in your browser using DataLab