Nothing
#' Calls a Function Provided by the User
#'
#' Calls a function provided by the user and adds the function call to the error
#' message if the call fails.
#'
#' @param call Call to be executed
#'
#'
#' @return The return value of the function call
#'
#' @family utils_help
#' @keywords utils_help
#'
#' @export
#'
#' @examples
#' call_user_fun(compute_bmi(
#' height = 172,
#' weight = 60
#' ))
#'
#' try(call_user_fun(compute_bmi(
#' height = 172,
#' weight = "hallo"
#' )))
call_user_fun <- function(call) {
tryCatch(
eval_tidy(call),
error = function(cnd) {
abort(
paste0("Calling ", as_label(enexpr(call)), " caused the following error:\n", cnd)
)
}
)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.