percentile | R Documentation |
This function calculates the percentiles of a numeric vector.
percentile(x = NULL, p = NULL, learn = FALSE, interactive = FALSE)
x |
Optional numeric vector (not needed for interactive mode) |
p |
Numeric value between 0 and 1 for percentile calculation (not needed for interactive mode) |
learn |
Logical, if TRUE shows step-by-step explanation |
interactive |
Logical, if TRUE enables interactive practice mode |
The percentile value (for non-interactive mode)
data <- c(1,4,3,3,2,5,7,12)
# Simple calculation
percentile(data, 0.3)
percentile(data, 0.3, learn = TRUE)
if(interactive()){
percentile(interactive = TRUE)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.