[Rd] checking dependencies in R code ... WARNING

Tobias Verbeke tobias.verbeke at openanalytics.eu
Thu May 8 09:34:57 CEST 2014


Hi Knut, 

I was primarily referring to the issues reported on the line

'library' or 'require' calls not declared from: 'Hmisc' 'R2HTML' 'tcltk'

but what you say for .win32consoleCompletion does not seem wrong,
esp. that it is not recommended to make use of ::: operators inside
a package.

Best,
Tobias

----- Original Message -----
> From: "Knut Krueger" <rh at knut-krueger.de>
> To: r-devel at r-project.org
> Sent: Thursday, May 8, 2014 8:59:43 AM
> Subject: Re: [Rd] checking dependencies in R code ... WARNING
> 
> Am 08.05.2014 08:35, schrieb Tobias Verbeke:
> > Hi Knut,
> >
> > The code will contain library or require statements, which
> > do not belong there, but need to replaced by specifying the
> > dependencies on these packages in the DESCRIPTION file
> > (Depends / Imports field). For imports you also need to
> > make sure the NAMESPACE file contains the intended statements.
> >
> > See
> >
> > http://cran.r-project.org/doc/manuals/R-exts.html#Package-Dependencies
> >
> > Best,
> > Tobias
> 
> Hi Tobias,
> 
> if I am right it should be a code from the utils package
> 
> # Use the internal win32consoleCompletion function in utils package
>      res <- utils:::.win32consoleCompletion(code, nchar(code))
> 
> IMPORT field ... Namespaces accessed by the ‘::’ and ‘:::’ operators
> must be listed here,
> 
> DESCRIPTION
> Imports: utils, foo, ...
> 
> it is included
> 
> NAMESAPCE:
> import(utils, foo, ....)
> 
> 
> could it be another problem? I found:
> Using foo:::f instead of foo::f allows access to unexported objects.
> This is generally not recommended, as the semantics of unexported
> objects may be changed by the package author in routine maintenance.
> 
> 
> Best
> Knut
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 



More information about the R-devel mailing list