transformFeatures: Transform feature columns

Description Usage Arguments Value Examples

View source: R/transformFeatures.R

Description

Transform the feature columns in a dataframe while excluding the response column (if is exists)

Usage

1
transformFeatures(df, FUN, colname.response = NULL)

Arguments

df

A dataframe of features (with or without a response column)

FUN

A function describing the transformation of each column

colname.response

(Optional) The name of a column containing the response classes. This can be omitted if the dataframe only contains feature columns. This is useful if the response vector is a separate object.

Value

Returns a dataframe of transformed features

Examples

1
transformFeatures(df, function(x){ log10(x) }, colname.response = 'response')

luannnguyen/mltoolkit documentation built on Aug. 29, 2020, 8:31 a.m.