gf_stat: Graph basic descriptive statistics on a quantitative variable

View source: R/gf_stats.R

gf_statR Documentation

Graph basic descriptive statistics on a quantitative variable

Description

Creates a graphics layer displaying a point or interval statistic (as from dfstats).

Usage

gf_stat(object, formula, data = NULL, stat = NULL, geom = gf_errorbar, ...)

Arguments

object

When chaining, this holds an object produced in the earlier portions of the chain. Most users can safely ignore this argument. See details and examples.

formula

A formula as with dfstats - quantitative response vs categorical explanatory vars

data

A data frame

stat

A single statistic to be display, e.g., mean, ci.mean, median, ...

...

statistics to calculate (as with df_stats)

Examples

gf_jitter(price ~ cut, data = tail(diamonds,1000), alpha = 0.1) %>%
  gf_stat(price ~ cut, stat = ci.mean)


dtkaplan/SDSdata documentation built on June 28, 2022, 8:09 a.m.