R/is_stats.R

Defines functions is_stats

Documented in is_stats

#' Is Stats
#'
#' Checks if an object can be interpreted as stats.
#'
#' @inheritParams clean_stats
#'
#' @export
is_stats <- function(stats) {
  all_numeric <- do.call(what = all, args = lapply(stats, is.numeric))
  is_unique(names(stats)) & all(names(stats) %in% statnames) & all_numeric
}
cphaarmeyer/warlockr documentation built on April 1, 2021, 12:31 a.m.