maxmin: Max-Min Scaling Function

View source: R/maxmin.R

maxminR Documentation

Max-Min Scaling Function

Description

This function allows you to scale vectors or an entire data frame using the max-min scaling method A numeric vector is always returned.

Usage

maxmin(x)

Arguments

x

Pass a vector or the required columns of a data frame through this argument.

Examples

library(magrittr)
library(dplyr)

rand <- rnorm(100, mean = 0, sd = 1)
data.frame(original = rand, transformed = maxmin(rand))

iris %>% mutate(Petal.Length2 = maxmin(Petal.Length))

maxmin(iris$Petal.Length)

martinctc/surveytools documentation built on Nov. 21, 2024, 10:48 p.m.