Skip to contents

Used for explicitly calling untrace() on a ggproto object.

Usage

gguntrace(method, ...)

Arguments

method

A function or a ggproto method. The ggproto method may be specified using any of the following forms:

  • ggproto$method

  • namespace::ggproto$method

  • namespace:::ggproto$method

...

Ignored. Designed for the ease of calling this function by modifying the call to an earlier {ggtrace} function in interactive contexts.

Details

Unlike base::untrace(), there is no adverse side effect to repeatedly calling gguntrace() on a ggproto method. gguntrace() will only throw an error if the method cannot be found.

If the method is valid, gguntrace() will do one of two things:

  • Inform that it has successfully removed the trace (after untracing)

  • Inform that the there isn't an existing trace (after doing nothing)

See also

Examples

library(ggplot2)

gguntrace(Stat$compute_layer)
#> `Stat$compute_layer` not currently being traced.

is_traced(Stat$compute_layer)
#> [1] FALSE

ggtrace(Stat$compute_layer, 1)
#> `Stat$compute_layer` now being traced.

is_traced(Stat$compute_layer)
#> [1] TRUE

gguntrace(Stat$compute_layer)
#> `Stat$compute_layer` no longer being traced.

is_traced(Stat$compute_layer)
#> [1] FALSE

gguntrace(Stat$compute_layer)
#> `Stat$compute_layer` not currently being traced.