Skip to content

This is a helper function for stat_chain() to pass parameters and declare mappings.

Usage

link_stat(stat, ..., after.stat = aes())

Arguments

stat

The statistical transformation to use on the data. The stat argument accepts the following:

  • A Stat ggproto subclass, for example StatCount.

  • A string naming the stat. To give the stat as a string, strip the function name of the stat_ prefix. For example, for stat_count(), give the string "count".

...

Other arguments passed to the stat as a parameter.

after.stat

Set of aesthetic mappings created by aes() to be evaluated only after the stat has been computed.

Value

A list bundling the stat, parameters and mapping.

See also

Examples

# See `?stat_chain`