Learn R Programming

sbpiper (version 1.9.0)

normalise_vec: Normalise a vector within 0 and 1

Description

Normalise a vector within 0 and 1

Usage

normalise_vec(vec, na.rm = TRUE)

Arguments

vec

the vector to normalise

na.rm

TRUE if NA values should be discarded

Value

the normalised vector

Examples

Run this code
# NOT RUN {
v <- c(-4,2,10,25,9,NA)
normalise_vec(vec=v)
# }

Run the code above in your browser using DataLab