#' Set the Value of a Missing Function Argument
#'
#' A simple wrapper around ifelse with the condition set to missing(x)
#'
#' @param x A function argument
#' @param true What to return if x is missing. Default is `NA`
#' @param false What to return if x is not missing. Default to return itself
#'
#' @noRd
if_missing <- function(x, true = NA, false = x) {
ifelse(missing(x), true, false)
}
#' Title
#'
#' @return
#' @export
#'
#' @noRd
check_mark_text <- function() {
if (
requireNamespace("crayon", quietly = TRUE) &
requireNamespace("clisymbols", quietly = TRUE)
) check_mark <- crayon::green(clisymbols::symbol$tick)
else check_mark <- ""
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.