Skip to contents

scale_transform() transform specified columns in a data frame using a provided scale. If divide = FALSE, it's simply x * scale, otherwise it is x / scale.

Usage

scale_transform(df, cols, scale = 100, divide = TRUE)

Arguments

df

A data frame.

cols

Names of columns to transform.

scale

Value to scale the vector(s) by. Defaults by 100

divide

If TRUE, divide the vector by the scale. Otherwise, multiply.

Value

A data frame.