Description Usage Arguments Value Examples
Calculates the standard deviation. By selecting sample = TRUE, the user chooses to calculate the sample standard deviation, where the sum of square is divided by n-1. By selecting sample = FALSE, the calculation is treated as a population standard deviation, and the sum of squares is divided by n.
1 | stdeviation(input, na.rm = FALSE, sample = TRUE)
|
input |
a vector of numbers |
na.rm |
true or false for removing NAs from the vector before calculations |
sample |
true or false where true represents a sample standard deviation and false represents a population standard deviation |
A number
1 2 3 4 5 6 7 8 9 10 11 | a <- c(2,4,6,8)
stdeviation(a)
b <- c(NA,2,4,NA,8)
stdeviation(b)
d <- c(NA,2,4,NA,8)
stdeviation(d,na.rm=T)
e <- c(NA,2,4,8,NA)
stdeviation(e,na.rm=T,sample=F)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.