All, I have used package.skeleton, edited the .Rd files and the DESCRIPTON file. In one of my package functions I am using RODBC so I have a line of code that reads: require(RODBC). In my DESCRIPTION file I have the following relevant line: Depends: R (>= 2.9.0), RODBC However, when I do a check (Rcmd check my_package_name) I get this warning: * checking for unstated dependencies in R code ... WARNING 'library' or 'require' calls not declared from: RODBC See the information on DESCRIPTION files in the chapter 'Creating R packages' of the 'Writing R Extensions' manual. Does anyone know where I have gone astray? Thank you. Jeff Breiwick
On Fri, 18 Dec 2009, Jeff Breiwick wrote:> All, > > I have used package.skeleton, edited the .Rd files and the DESCRIPTON file. > In one of my package functions I am using RODBC so I have a line of code > that reads: require(RODBC). > > In my DESCRIPTION file I have the following relevant line: > Depends: R (>= 2.9.0), RODBC > > However, when I do a check (Rcmd check my_package_name) I get this warning: > * checking for unstated dependencies in R code ... WARNING > 'library' or 'require' calls not declared from: > RODBC > See the information on DESCRIPTION files in the chapter 'Creating R > packages' of the 'Writing R Extensions' manual. > > Does anyone know where I have gone astray? Thank you.Using require(RODBC): the Depends declaration already loaded RODBC.> Jeff Breiwick-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
On Fri, Dec 18, 2009 at 3:50 PM, Jeff Breiwick <Jeff.Breiwick at noaa.gov> wrote:> Thanks for you advice. ?I do, in fact, have a call to RODBC in my function > that uses RODBC functions. The first line of that function is > require(RODBC). The odd thing is if I leave off ROBDC from the DESCRIPTION > file then rcmd check pkgname completes and gives me a warning about RODBC. > However, I can install the package and it works. But if I include RODBC in > the Depends: line of DESCRIPTION, the check bombs shortly after the Depends > line. > > Jeff BreiwickHmm, try placing an .onLoad() function in your package and moving the call to require() inside of it-- you may have to have it there. =Charlie