R/compute.R

Defines functions compute_stat

Documented in compute_stat

#' Compute a statistical transformation
#'
#' @param params A parameter object generated by of the other functions in
#'    this packagea
#' @param x X position. This is required by all stats.
#' @param y Y position. This is required by all 2d stats.
#' @param w Optional weights. If supplied, must be a numeric vector the
#'    same length as \code{x}.
#' @param ... Additional arguments passed on to stat.
#' @export
compute_stat <- function(params, x, ..., w = NULL) {
  UseMethod("compute_stat")
}
hadley/ggstat documentation built on May 17, 2019, 10:40 a.m.