data <- c(1,4,3,3,2,5,7,12,1,2,3,12)
value <- 12
# Simple calculation
absolute_frequency(data, value)
# Learning mode
absolute_frequency(data, value, learn = TRUE)
# Interactive mode
if(interactive()){
absolute_frequency(interactive = TRUE)
}
Run the code above in your browser using DataLab