R/merge_data_utils.R

Defines functions check_merge_function

Documented in check_merge_function

#' Check if the merge function is valid
#'
#' @param merge_function (`character`) merge function name.
#'
#' @return Raises an error when check fails, otherwise, it returns `NULL`, invisibly.
#'
#' @keywords internal
#'
check_merge_function <- function(merge_function) {
  checkmate::assert_string(merge_function)
  stopifnot(length(intersect(methods::formalArgs(eval(rlang::parse_expr(merge_function))), c("x", "y", "by"))) == 3)
}

Try the teal.transform package in your browser

Any scripts or data that you put into this service are public.

teal.transform documentation built on May 29, 2024, 5:06 a.m.