From edd at debian.org  Fri May 15 14:47:29 2015
From: edd at debian.org (Dirk Eddelbuettel)
Date: Fri, 15 May 2015 07:47:29 -0500
Subject: [Rd] example fails during R CMD CHECK but works interactively?
In-Reply-To: <CABdHhvGRvmLfedUHDqVSFuUtqghOtikX9zd27o7PiO+j2xLm-g@mail.gmail.com>
References: <CAKxd1KNtOjyq5DYEVmvw=NQUrnL5LVZYuSt=1cyfE=QQQquCLw@mail.gmail.com>
	<1612739531.2387533.1431543079541.JavaMail.root@fredhutch.org>
	<CAKxd1KMgT700+uKmD8v-QJoG5NmpeA+t3rSR-gg1L19=NbpzPw@mail.gmail.com>
	<CAKxd1KMkW6mx9hYdDwtQ6k9R7BnvufZspFs8fJPovYJXXgW75Q@mail.gmail.com>
	<CABdHhvGRvmLfedUHDqVSFuUtqghOtikX9zd27o7PiO+j2xLm-g@mail.gmail.com>
Message-ID: <21845.60129.410996.217354@max.nulle.part>


On 15 May 2015 at 07:13, Hadley Wickham wrote:
| Make the example print out Sys.getenv() and then manually inspect?

On the systems I use    system("env")     is more efficient as it gets you
all at once. 
 
| Otherwise, you'll need to debug the code by adding print statements.
| Something clearly is not as you expect, so you need carefully
| empirically verify your assumptions about the inputs to and
| environment of the function.

Exactly. No magic here, just plainstaken debugging.

As an old ~/.signature of mine said: "In theory, theory and practice are the
same. In practie, they are not."  Assumptions are good.  We all get a good
laugh out of them after the fact.

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org



[Rd] example fails during R CMD CHECK but works interactively?
Dirk Eddelbuettel