Re: [Rd] Tips for debugging: R CMD check examples

From: Spencer Graves <>
Date: Wed, 30 Jun 2010 06:29:58 -0700

Hi, Hadley:

  1. Is your memory clear when you run the examples successfully? I.e., start with "rm(list=objects())", then try the examples that work interactively but fail in "R CMD check".
  2. Also, does "R CMD check" give any warnings, e.g., undefined global, in addition to the error message? If yes, fixing those might also fix the error message.

       The suggestions of Deepayan and Sarker are excellent, but the two things I suggests are more targeted and might work, so I'd try them first.

       Hope this helps.

On 6/30/2010 1:05 AM, Deepayan Sarkar wrote:
> On Wed, Jun 30, 2010 at 3:26 AM, Hadley Wickham<> wrote:
>> Hi all,
>> Does anyone have any suggestions for debugging the execution of
>> examples by R CMD check? The examples work fine when I run them from
>> a live R prompt, but I get errors when they are run by R CMD check.
> 'R CMD check pkg' will produce a pkg.Rcheck/pkg-Ex.R file that
> collects the examples into a single file (and also does other things).
> You could try running that file interactively to see if the error is
> reproduced.
> -Deepayan
> ______________________________________________
> mailing list

Spencer Graves, PE, PhD
President and Chief Operating Officer
Structure Inspection and Monitoring, Inc.
751 Emerson Ct.
San José, CA 95126
ph:  408-655-4567

______________________________________________ mailing list
Received on Wed 30 Jun 2010 - 13:33:03 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 30 Jun 2010 - 13:41:28 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive