Skip to content

[R-pkg-devel] Whack-a-mole base::assign(".ptime", proc.time(), pos = "CheckExEnv")

3 messages · Mark Hogue, Peter Dalgaard

#
(The subject title is in reference to the arcade game where fake mole heads
pop up and the contestant is challenged to smash them down as more and more
keep popping up.)

I made some changes to a package and when I run the R CMD check, I get one
error with this lead-in notification:

Running examples in 'radsafer-Ex.R' failed
  The error most likely occurred in:
*base::assign(".ptime", proc.time(), pos = "CheckExEnv")*

When I do something with the affected function, I get a similar error on
another function.

Could it have something to do with my having added argument checks on these
functions? Could someone advise where to go to understand this error
better? And is it normal to get only one error at a time like this?

Thanks,

Mark
#
That line is a generic part of the timing (it records current time so that at the end you can do what amounts to "Time used:" proc.time() - .ptime). 

It is not likely to contain the actual error -- notice that the message just gives you a best guess of the error location and that may fail. You probably need to have a look at the actual radsafer-Ex.R file and its output to find the true culprit.

If you have catastrophic failures, yes, you see them only one at a time.

-pd

  
    
#
Thank you very much Peter. Your advice helped me find the error. I had not
previously known where to find the package's -Ex.R file, and I didn't even
realize that this was a timeout error. (The -Ex.R file was in my working
directory, not the package directory.) One function did have some long
examples, but that function was never mentioned in the error, so it was
very confusing.

Cheers,

Mark
On Tue, Apr 30, 2019 at 4:44 AM peter dalgaard <pdalgd at gmail.com> wrote: