median_ {UAHDataScienceSF} | R Documentation |
Median Function
Description
This function calculates the median of a numbers vector.
Usage
median_(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 median of the vector (for non-interactive mode)
Examples
data <- c(1,3,2,5,12,4,4,2,9)
# Simple calculation
median_(data)
# Learning mode
median_(data, learn = TRUE)
# Interactive mode
if(interactive()){
median_(interactive = TRUE)
}
[Package UAHDataScienceSF version 1.0.0 Index]