Learn R Programming

transx (version 0.0.1)

std: Standarization

Description

Convert number of standard deviations by which the value of a raw score is above or below the mean value of what is being observed or measured.

Usage

std_mean(x, na.rm = getOption("transx.na.rm"))

std_median(x, na.rm = getOption("transx.na.rm"))

Arguments

x

[univariate vector]

Univariate vector, numeric or ts object with only one dimension.

na.rm

[logical(1): getOption("transx.na.rm")]

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

Value

Returns a vector with the same class and attributes as the input vector.

Examples

Run this code
# NOT RUN {
x <- c(10,2,5,3)
std_mean(x)
scale(x)

std_median(x)
# }

Run the code above in your browser using DataLab