rms | R Documentation |
This function computes the sample root-mean-square (RMS).
rms(x, na.rm = FALSE)
x |
numeric vector that contains the sample data points. |
na.rm |
logical vector that determines whether the missing values should be removed or not. |
RMS is expressed as
x_{rms} = \sqrt{\frac{\sum \limits_{i=1}^n{x_{i}^{2}}}{n}}
x_rms
the sample harmonic mean
the values in a sample
the number of values
sample root-mean-square as a numeric vector. The default choice is that
any NA values will be kept (na.rm = FALSE
). This can be changed by
specifying na.rm = TRUE
, such as rms(x, na.rm = TRUE)
.
Irucka Embry
Masoud Olia, Ph.D., P.E. and Contributing Authors, Barron's FE (Fundamentals of Engineering Exam), 3rd Edition, Hauppauge, New York: Barron's Educational Series, Inc., 2015, page 84.
sgm
for geometric mean, shm
for harmonic mean, cv
for coefficient of variation (CV), relerror
for relative error,
approxerror
for approximate error, and ranges
for sample range.
library(iemisc)
samp <- c(0.5, 100, 1000.25, 345, 0.0213, 0, 45, 99, 23, 11, 1, 89, 0, 34,
65, 98, 3)
rms(samp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.