Skip to content

close but no cigar

2 messages · Mark Leeds, Gavin Simpson

#
On Mon, 2011-11-07 at 15:39 -0500, Mark Leeds wrote:
What does this have to do with compiling R on Fedora?

You don't provide enough info to diagnose properly, but as utils is
actually part of R and not a Recommended package, R would not pass check
if the utils package were not available.

What I suspect is happening is that during loading of your package, you
are calling a function from the utils package but the utils package is
not yet available for use (its namespace has not yet been "loaded"), so
as far as R is concerned at this point in time a function defined in the
utils namespace may as well not exist.

Have you got some code that is run during package loading/attaching? If
so, find it and add utils::: to the front of packageDescription( ).

For example, I have the file zzz.R in one of my packages that contains:

.onAttach <- function(lib, pkg)  {
    library.dynam("analogue", pkg, lib)
    packageStartupMessage("This is analogue ",
                          utils::packageDescription("analogue",
                                                    field="Version"),
                          appendLF = TRUE)
}

HTH

G