[R-pkg-devel] package with datasets requiring sp

Aurélie Siberchicot @ure||e@@|berch|cot @end|ng |rom un|v-|yon1@|r
Mon Jan 17 16:06:40 CET 2022


Hi,

I maintain the 'ade4' package which contains data with S4 objects from 
the package 'sp'.
Some functions of the 'sp' package are also used in examples in some Rd 
files (using the code -- if(requireNamespace("sp", quietly = TRUE)) {} --).
In February 2020, I moved the 'sp' package from 'Suggests' to 'Imports' 
according to an email received from Brian Ripley, because "At least one 
of the datasets cannot be loaded without a package declared in Suggests: 
-- typically this is because it loads a namespace defining S4 classes, 
and such imports should be declared in Imports or (as Matrix does) use a 
.R wrapper."

For a few months, I have had the following NOTE:
* checking dependencies in R code ... NOTE
Namespace in Imports field not imported from: ‘sp’
All declared Imports should be used.

In 'Writing R Extensions', I found: "Packages needed to use datasets 
from the package should be in ‘Imports’: this includes those needed to 
define S4 classes used."

Moving back 'sp' in 'Suggests' seems to solves the NOTE but is contrary 
to the recommendations of 'Writing R Extensions' and Brian Ripley.
I'm a bit confused to solve this note and the best way to declare the 
dependency of 'ade4' to 'sp'.
Is anyone in my situation? Does anyone have any advice?

Thanks in advande for any help.
Cheers.
Aurélie.





-- 
Aurélie SIBERCHICOT
Ingénieure en Ingénierie Logicielle
04 72 44 85 98 - aurelie.siberchicot using univ-lyon1.fr

Laboratoire Biométrie et Biologie Evolutive - UMR CNRS 5558
Université Claude Bernard - Lyon 1
Bâtiment Grégor Mendel, 43 boulevard du 11 novembre 1918
69622 Villeurbanne cedex


	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list