[R-pkg-devel] CRAN packages suggesting other packages but not using them conditionally

Ben Bolker bbo|ker @end|ng |rom gm@||@com
Sat Dec 12 18:58:16 CET 2020


   I think you're supposed to skip the example (throwing a warning, if 
you like ...) if rgl isn't available, rather than throwing an error ... ?

On 12/12/20 11:24 AM, Michael L Friendly wrote:
> I got the email below concerning 3 of my packages but wonder if they are false alarms or
> if not, how to locate & fix the problem.
> 
>      This concerns packages: ...
> 
>      Suggested packages should be used conditionally: see �1.1.3.1 of 'Writing R Extensions'.  Some of these are hard to install on a platform without X11 such as M1 Macs: see the logs at https://www.stats.ox.ac.uk/pub/bdr/M1mac/.
> 
>      You can check all of the suggested packages by setting environment variable _R_CHECK_DEPENDS_ONLY_=true  -- see https://cran.r-project.org/doc/manuals/r-devel/R-ints.html#Tools .
> 
> Is this a false alarm?
> 
> In each case, the outfile contains:
> 
>      * checking package namespace information ... OK
>      * checking package dependencies ... NOTE
>      Package suggested but not available for checking: 'rgl'
> 
> indicating that rgl is not avaiable on the testing machine.  Then, when checking examples an error is triggered
> when an example calls something that requires rgl.
> 
>      >
>      > heplot3d(Adopted.mod, hypotheses=list("Reg"=c("AMED", "BMIQ")),
>      +         col = c("red", "blue", "black", "gray"), wire=FALSE)
>      Loading required namespace: rgl
>      Failed with error:  'there is no package called 'rgl''
>      Error in heplot3d.mlm(Adopted.mod, hypotheses = list(Reg = c("AMED", "BMIQ")),  :
>        rgl package is required.
>      Calls: heplot3d -> heplot3d.mlm
>      Execution halted
> 
> Yet, heplot3d seems to contain the required way to refer to the suggested rgl package:
> 
>                  if (!requireNamespace("rgl")) stop("rgl package is required.")
> 
> So, I'm mystified.  Can anyone help?
> 
> 
> 
> Michael Friendly     Email: friendly AT yorku DOT ca
> Professor, Psychology Dept. & Former Chair, ASA Statistical Graphics Section
> York University      Voice: 416 736-2100 x66249
> 4700 Keele Street    Web: http://www.datavis.ca | @datavisFriendly
> Toronto, ONT  M3J 1P3 CANADA
> 
> 
> 	[[alternative HTML version deleted]]
> 
> 
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>



More information about the R-package-devel mailing list