R/assert.R

Defines functions check_aes

#' @importFrom rlang abort
check_aes <- function(aes, data_names) {
  not_in_names <- !(aes %in% data_names)
  if (any(not_in_names)) {
    abort(paste(
      "The following aesthetics are not present in data: ",
      paste(aes[not_in_names], collapse = ", ")
    ))
  }
}
lorenzwalthert/simplificar documentation built on May 7, 2019, 9:32 a.m.