util: stdz, Standardise a set of data

Description Usage Arguments Value Note Author(s) See Also Examples

Description

Function takes a vector and scales it so the mean is 0 and the standard deviation is 1. It is intended to be used with the ply package that implement the split-apply-combine pattern in R

Usage

1
  stdz(x, na.rm = TRUE)

Arguments

x,

An R object. Currently there is only a method for numeric vectors.

na.rm

a logical value indicating whether NA values should be stripped before the computation proceeds.

Value

A vector.

Note

nn

Author(s)

Laurence Kell

See Also

minMax (scale so min=0 and max=1)

Examples

1
2
3
4
x = rlnorm(100,.2,.3)
x = stdz(x)
mean(x)
se(x)

laurieKell/ggplotFL documentation built on May 20, 2019, 7:59 p.m.