standardize: Scale atomic vector to lie between 0 and 1

Description Usage Arguments Examples

Description

This function takes a vector of data and scales it to lie between the values 0 and 1. It is intended as a helper function and can be used with map

Usage

1

Arguments

x

A numeric vector

Examples

1
2
3
4
5
6
7
8
# Standardize a vector
x <- rnorm(100, 3, 5)
standardize(x)

# Standardize the columns of a data frame
iris %>%
 select(-Species) %>%
 purrr::dmap(standardize)

dandermotj/MetSizeR documentation built on May 14, 2019, 3:34 p.m.