valid_methods <- c("log", "log2", "log10")
my_method <- "C"
try(
if(!(my_method %in% valid_methods)) {
stop("Method does not exist!", call. = FALSE)
}
)
test2 <- function(type) {
if (type == "mean") {
entropy = calculateDefaultEntropy()
}
else if (type == "median") {
entropy = calculateMLEntropy()
}
else if (type == "trimmed") {
zzz
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.