Description Usage Arguments Value Examples
Calculates the arithmetic mean of a set of numbers. The function adds up the numbers in the vector and divides by the number of elements in the vector.
1 | arithmeticmean(input, na.rm = FALSE)
|
input |
a vector of numbers |
na.rm |
true or false for whether to remove NA's before performing the calculation |
A number
1 2 3 4 5 6 7 8 | a <- c(-4,9,1,-6)
arithmeticmean(a)
b <- c(-4,NA,NA,9,1,-6)
arithmeticmean(b)
d <- c(-4,NA,NA,9,1,-6)
arithmeticmean(d,na.rm=T)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.