View source: R/average_deviation.R
average_deviation | R Documentation |
This function calculates the average absolute deviation of a numbers vector.
average_deviation(x = NULL, learn = FALSE, interactive = FALSE)
x |
Optional numeric vector (not needed for interactive mode) |
learn |
Logical, if TRUE shows step-by-step explanation |
interactive |
Logical, if TRUE enables interactive practice mode |
The average absolute deviation of the vector (for non-interactive mode)
data <- c(7,2,5,7,1,4,12)
# Simple calculation
average_deviation(data)
# Learning mode
average_deviation(data, learn = TRUE)
# Interactive mode
if(interactive()){
average_deviation(interactive = TRUE)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.