variance {UAHDataScienceSF} | R Documentation |
Variance Function
Description
This function calculates the variance of a numbers vector.
Usage
variance(x = NULL, learn = FALSE, interactive = FALSE)
Arguments
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 |
Value
The variance of the vector (for non-interactive mode)
Examples
data <- c(10,4,5,7,3,4,1)
# Simple calculation
variance(data)
# Learning mode
variance(data, learn = TRUE)
# Interactive mode
if(interactive()){
variance(interactive = TRUE)
}
[Package UAHDataScienceSF version 1.0.0 Index]