mutate_cond <- function(.data, condition, ..., envir = parent.frame()) {
# Conditionally apply dplyr::mutate()
condition <- eval(substitute(condition), .data, envir)
.data[condition, ] <- .data[condition, ] %>% mutate(...)
.data
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.