create_stat_with_caching: Create a debug version of the given Stat

Description Usage Arguments Value

Description

Create a debug version of the given Stat by creating a new Stat which directly inherits from the original Stat. Then for each named method, rewrite the method body to capture arguments and return values for each call.

Usage

1
2
3
4
create_stat_with_caching(OriginalStat, methods = c("parameters",
  "aesthetics", "setup_params", "setup_data", "compute_layer",
  "compute_panel", "compute_group", "finish_layer"), verbose = FALSE,
  head_n = 6)

Arguments

OriginalStat

Ggproto Stat object to debug. e.g. StatIdentity

methods

Methods within ggproto object to debug. Default: all methods

verbose

Print arguments and return values during ggplot build and render process. Default: FALSE

head_n

Argument to head() when printing data.frames. Default: 6

Value

A subclass of the given Stat with each method modified to capture the argument list and return value.


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