From 58bb26307b3cc43d4af4b9ec3594bf33c252103e Mon Sep 17 00:00:00 2001 From: boB Rudis Date: Tue, 18 Jun 2019 17:04:52 -0400 Subject: [PATCH] added computed stat info --- R/stat-logspline.R | 11 +++++++++++ man/stat_logspline.Rd | 13 +++++++++++++ 2 files changed, 24 insertions(+) diff --git a/R/stat-logspline.R b/R/stat-logspline.R index d185a95..f4cc563 100644 --- a/R/stat-logspline.R +++ b/R/stat-logspline.R @@ -68,6 +68,17 @@ StatLogspline <- ggproto( #' Computes logspline density (+ counts estimate), probability, survival & hazard #' +#' +#' @section Computed variables: +#' +#' - `density` : the density estimate +#' - `count`: computed counts (similar to [ggplot2::stat_density()]) +#' - `probs`: distribution function +#' - `survival`: survival function +#' - `hazard` : hazard function +#' +#' By default the `y` aesthetic is mapped to `stat(density)` +#' #' @inheritParams ggplot2::stat_density #' @param n numbe of points for the density estimation (larger == smoother) #' @param max_knots the maximum number of knots. The routine stops adding knots when diff --git a/man/stat_logspline.Rd b/man/stat_logspline.Rd index 31c0946..ae3409f 100644 --- a/man/stat_logspline.Rd +++ b/man/stat_logspline.Rd @@ -71,6 +71,19 @@ to the paired geom/stat.} \description{ Computes logspline density (+ counts estimate), probability, survival & hazard } +\section{Computed variables}{ + +\itemize{ +\item \code{density} : the density estimate +\item \code{count}: computed counts (similar to \code{\link[ggplot2:stat_density]{ggplot2::stat_density()}}) +\item \code{probs}: distribution function +\item \code{survival}: survival function +\item \code{hazard} : hazard function +} + +By default the \code{y} aesthetic is mapped to \code{stat(density)} +} + \examples{ library(ggplot2)