Skip to contents

clear_traces() removes the traces recorded on a module and keeps everything else, such as its demos and settings. The module is changed in place. The session's prompt history is separate; see clear_prompt_history().

Usage

clear_traces(module)

Arguments

module

A module.

Value

The module, invisibly. A message reports how many traces were removed.

Examples

shout <- module_fn("text -> reply", function(text) toupper(text))
run(shout, text = "hello")
#> $reply
#> [1] "HELLO"
#> 
clear_traces(shout)
#> Cleared 1 trace
nrow(export_traces(shout))
#> No traces recorded in this module
#> [1] 0