Root mean square function in R

Spread the love

Question Description

A very brief question.
After much searching I couldn’t find a function to calculate the RMS of a set of integers. Does such a function exist in R?

Practice As Follows

I didn’t search for a function but you can write it

x <- 1:10

A better alternative is using mean function

> sqrt(mean(x^2))
[1] 6.204837

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.