rms: Root Mean Square (RMS), or Quadratic Mean

View source: R/rms.R

rmsR Documentation

Root Mean Square (RMS), or Quadratic Mean

Description

Returns the RMS, or quadratic mean of a vector of numbers.

Usage

rms(x, na.rm = FALSE)

Arguments

x

Vector of numbers, required.

na.rm

Logical value, optional, FALSE by default. If FALSE, result is NA if any of the values in x is NA. If TRUE, remove the NA values first.

Details

The quadratic mean is one type of average. It is the square root of the arithmetic mean of the squares. See http://en.wikipedia.org/wiki/Root_mean_square or http://mathworld.wolfram.com/Root-Mean-Square.html for many applications

Value

Returns a single number

See Also

geomean() mean() harmean()

Examples

rms(c(1,2,4)) 

ejanalysis/analyze.stuff documentation built on April 2, 2024, 10:10 a.m.