
This function computes the sample root-mean-square (RMS).
rms(x, na.rm = FALSE)
numeric vector that contains the sample data points.
logical vector that determines whether the missing values should be removed or not.
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)
.
RMS is expressed as
the sample harmonic mean
the values in a sample
the number of values
Masoud Olia, Ph.D., P.E. and Contributing Authors, Barron<U+2019>s FE (Fundamentals of Engineering Exam), 3rd Edition, Hauppauge, New York: Barron<U+2019>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.
# NOT RUN {
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)
# }
Run the code above in your browser using DataLab