Learn R Programming

oce (version 1.1-1)

oceDebug: Print a debugging message

Description

Print an indented debugging message. Many oce functions decrease the debug level by 1 when they call other functions, so the effect is a nesting, with more space for deeper function level.

Usage

oceDebug(debug = 0, ..., unindent = 0)

Arguments

debug

an integer, less than or equal to zero for no message, and greater than zero for increasing levels of debugging. Values greater than 4 are treated like 4.

items to be supplied to cat, which does the printing. Almost always, this should include a trailing newline.

unindent

Number of levels to un-indent, e.g. for start and end lines from a called function.

Examples

Run this code
# NOT RUN {
foo <- function(debug)
{
   oceDebug(debug, "in function foo\n")
}
debug <- 1
oceDebug(debug, "in main")
foo(debug=debug-1)
# }

Run the code above in your browser using DataLab