Skip to content
Prev 29213 / 63424 Next

Routine and Deep testing with R CMD check

On Wed, 11 Jun 2008, Prof Brian Ripley wrote:

            
In Splus, if you set options(verbose=TRUE), then the time
for each top level expression is printed to stdout (or
to a log file, depending on other options).  The Time:
line tells which top level expression it refers to and
whether the expression succeeded or failed.  E.g.,

   > options(verbose=TRUE)
      Time: Task #2 succeeded (Seconds = 0.01 CPU, 0.01 elapsed)
   > for(i in 1:1e5)log(i)
      Time: Task #3 succeeded (Seconds = 1.49 CPU, 1.5 elapsed)
   > for(i in 1:1e5) if (i==1e5) stop("i is too big") else log(i)
     Error: Problem: i is too big
   Problem: i is too big
   Use traceback() to see the call stack
      Time: Task #4 failed (Seconds = 3.18 CPU, 3.2 elapsed)

If R had this sort of logging then check could turn it on
when desired.

Splus also uses this logging mechanism to log calls to
read.table() and inputData(), to record the initial
value of .Random.seed, etc., so one can run a perl script
over the log file for a batch run to see if there were
significant problems and have enough information to
reproduce the problems found.

----------------------------------------------------------------------------
Bill Dunlap
Insightful Corporation
bill at insightful dot com

 "All statements in this message represent the opinions of the author and do
 not necessarily reflect Insightful Corporation policy or position."