[R-pkg-devel] Help needed to setting custom packages for R 3.1.2

sbihorel Sebastien.Bihorel at cognigencorp.com
Mon Jul 13 21:46:29 CEST 2015


Hi,

My group has recently upgraded from a fairly old R version (2.12) to the 
R version 3.1.2. In parallel to this upgrade, I am updating our custom 
packages to add functionality and also make them compliant to the 
requirements of the new version of R. I would like to ask your help with 
respect to warning messages I get when I check and install the packages. 
I read the latest version of the manual on writing R extensions, try to 
apply the recommendations, but somehow I am not getting things right. 
Hopefully, with your suggestions, I could setup my package correctly to 
make these messages stop.

I apologize but, for confidentiality purpose, I will have to partially 
anonymize the information.

So here is the situation: we have 2 custom packages (let's call them 
pkgB and pkgC). The pkgB package depends on a 3rd package (let's call it 
pkgA) that is available on CRAN. The pkgC package depends on pkgB, make 
new function available,  and "overwrites" some of the functions 
distributed as part of pkgA. The following table summarizes the content 
of the DESCRIPTION and NAMESPACE files of each of these packages.

package    DESCRIPTION NAMESPACE
            Depends                       Imports 
import                         importFrom
pkgA       methods, lattice, grid, gam   Hmisc, survival lattice, grid, 
gam, methods    Hmisc
pkgB       pkgA pkgA
pkgC       methods, pkgB methods, pkgB

I do not get any warning when I build, check or install pkgB in our 
linux openSuse environment.

After successful building pkgC, I run R CMD check on my built for pkgC 
but I get a ton of messages under the "checking R code for possible 
problems" section. These notes are related to actual calls to pkgA 
functions (or to one of the function provided by its dependencies). Here 
is a subset for illustration and hopefully information.

* checking R code for possible problems: NOTE
pkgC_function_001: no visible global function definition 
for"pkgA_function_AAA"
pkgC_function_001: no visible global function definition 
for"pkgA_function_AAB"
...
pkgC_function_010: no visible global function definition for"xyplot"
pkgC_function_010: no visible global function definition for"panel.xyplot"
pkgC_function_010: no visible global function definition for"panel.abline"
pkgC_function_010: no visible global function definition for"grid.polygon"
pkgC_function_010: no visible global function definition for"gpar"
...

Now when I try to install the pkgC_0.0.1.tar.gz package, I get the 
following warnings about the content of my documentation Rd files. The 
Rd files of pkgC includes links to lattice, grid, or pkgA functions.

*** installing help indices
   converting help for package âkiwixposedevâ
     finding HTML links ... done
pkgC_function_001                    html
     pkgC_function_002                    html
...
Rd warning: /tmp/some/path/man/pkgC_function_009.Rd:21: missing file 
link "panel.abline"
...
Rd warning: /tmp/some/path/man/pkgC_function_015.Rd:64: missing file 
link "pkA_function_AAC"
...

I think I need to somehow modify the content of the DESCRIPTION and 
NAMESPACE files for pkgC... but adding various combinations of pkA and 
its dependencies gave me others errors about redundancies and multiple 
loading of the same packages. So in short, I am kind of lost with the 
new requirements of R 3.1.2 and would greatly appreciate any help or 
suggestions

Thank you in advance for your time.

Sebastien Bihorel


	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list