Henrik Bengtsson
2006-Sep-07 23:14 UTC
[Rd] R CMD check: unstated dependence on a standard package.
In the recent R-devel version, I receive the following error: * checking whether the package can be loaded with stated dependencies ... WARNING Error in doTryCatch(return(expr), name, parentenv, handler) : could not find function "packageDescription" Error in library(R.oo) : .First.lib failed for 'R.oo' Execution halted It looks like this package (or one of its dependent packages) has an unstated dependence on a standard package. All dependencies must be declared in DESCRIPTION. See the information on DESCRIPTION files in the chapter 'Creating R packages' of the 'Writing R Extensions' manual. I found the following comment in NEWS.R-2.5.0dev under "CHANGES IN R VERSION 2.4.0" related to two packages only: - throws an error if the standard packages 'methods' and 'stats4' are imported from and not declared in the DESCRIPTION file. When I add 'utils' to "Depends:" in the DESCRIPTION file the error goes away. Could you please confirm that you from now on have to specify also the 'utils' package and other standard package in Depends? Thanks Henrik
Kurt Hornik
2006-Sep-08 06:56 UTC
[Rd] R CMD check: unstated dependence on a standard package.
>>>>> Henrik Bengtsson writes:> In the recent R-devel version, I receive the following error: > * checking whether the package can be loaded with stated dependencies > ... WARNING > Error in doTryCatch(return(expr), name, parentenv, handler) : > could not find function "packageDescription" > Error in library(R.oo) : .First.lib failed for 'R.oo' > Execution halted> It looks like this package (or one of its dependent packages) has an > unstated dependence on a standard package. All dependencies must be > declared in DESCRIPTION. > See the information on DESCRIPTION files in the chapter 'Creating R > packages' of the 'Writing R Extensions' manual.> I found the following comment in NEWS.R-2.5.0dev under "CHANGES IN R > VERSION 2.4.0" related to two packages only:> - throws an error if the standard packages 'methods' and > 'stats4' are imported from and not declared in the > DESCRIPTION file.> When I add 'utils' to "Depends:" in the DESCRIPTION file the error > goes away. Could you please confirm that you from now on have to > specify also the 'utils' package and other standard package in > Depends?Yes, strictness was increased. In your non name space case, add to Depends. If the package had a name space, you would e.g. add importFrom("utils", "packageDescription") to NAMESPACE and add utils to the DESCRIPTION Imports. -k