get_geom: Get the name of the 'geom' which is using this stat.

Description Usage Details Value Examples

Description

This needs to be called from within a Stat method. It interrogates the frame stack to figure out the layer which called the Stat, and then gets the Geom from that layer.

Usage

1

Details

Written with the help of Brodie Gaslam

Value

name of geom, otherwise NA_character_

Examples

1
2
3
4
5
6
7
## Not run: 
  setup_params = function(data, params) {
   message("StatOathBreaker being used with: ", get_geom())
   params
 }

## End(Not run)

coolbutuseless/ggdebug documentation built on May 13, 2019, 11:25 a.m.