normf: Normalizes a numeric vector

Description Usage Arguments Value Examples

View source: R/normf_standf.R

Description

Takes a numeric vector and normalizes it with new min and max

Usage

1
normf(x, newMin, newMax, na.rm = FALSE)

Arguments

x

Numeric vector

newMin

Numeric value for the new minimum of the vector

newMax

Numeric value for the new maximum of the vector

na.rm

Logical value determining whether or not to remove NA values when calculating min and max. Defaults to FALSE.

Value

Numeric vector that is normalized

Examples

1
2
normf(c(1, 2, 3, 4, 5), 10, 20)
normf(c(1, 2, 10, -10), 5, 10, na.rm = TRUE)

ryanmcnamara4/myPackage documentation built on Dec. 22, 2021, 8:18 p.m.