On Thu, Jan 12, 2012 at 12:12 PM, William Dunlap <wdun...@tibco.com> wrote: > You could put your debug-only code into a function calls like > ifDebug(diagnosticPlot(c)) > and > ifDebug({ > tmp <- timeConsumingFunction(c) > stopifnot(tmp < 1.0) > }) > When you want debug output define ifDebug as > ifDebug <- function(expr) force(expr) > and when you don't want it define it as > ifDebug <- function(expr) NULL
or even ifDebug <- force for the first one. -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.