Skip to contents

Check if a method is being traced

Usage

is_traced(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

Value

logical

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.