laplace | R Documentation |
This function calculates Laplace's Rule for a probability experiment.
laplace(x = NULL, y = NULL, learn = FALSE, interactive = FALSE)
x |
Optional first vector (not needed for interactive mode) |
y |
Optional second vector (not needed for interactive mode) |
learn |
Logical, if TRUE shows step-by-step explanation |
interactive |
Logical, if TRUE enables interactive practice mode |
The probability according to Laplace's Rule (for non-interactive mode)
data <- 3
data2 <- c(1,2,3,4,5,6)
# Simple calculation
laplace(data, data2)
# Learning mode
laplace(data, data2, learn = TRUE)
# Interactive mode
if(interactive()){
laplace(interactive = TRUE)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.