#' weight_diff
#'
#' @description A fct function
#'
#' @return The return value, if any, from executing the function.
#'
#' @noRd
weight_diff <- function(weight, bin) {
dplyr::if_else(bin == "Yes",
weight ,
pmax(0,
weight - lag( weight ),
na.rm = TRUE
)
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.