tron.environment: tron - Log a session or package

Description Usage Arguments Options Examples

Description

Call .tron.function on each function in an environment and assign the result back.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## S3 method for class 'character'
.tron(x, logger = getOption("tron.logger", "message"),
  verbose = getOption("tron.verbose", FALSE))

## S3 method for class 'character'
.troff(x)

## S3 method for class 'environment'
.tron(x, logger = getOption("tron.logger", "message"),
  verbose = getOption("tron.verbose", FALSE))

## S3 method for class 'environment'
.troff(x)

Arguments

x

an environment or name of namespace; defaults to the parent.frame

logger

a logging function or name of function which accepts ...

verbose

logical, log which functions are detected and modified

Options

You can set the following default parameters using option:

tron.logger

name of a logging function

tron.verbose

logical

Examples

1
2
3
4
f <- function(a,b) a / b
zzz <- function(x,y) f(x,y) / f(y,x)
tron(environment(), verbose=TRUE)
zzz(2,1)

nfultz/tron documentation built on May 23, 2019, 4:41 p.m.