Tiago,

Looking at https://www.stats.ox.ac.uk/pub/bdr/noSuggests/pliman.out
we see it errors after trying '* checking examples ...':

   * checking examples ... ERROR
   Running examples in ‘pliman-Ex.R’ failed
   The error most likely occurred in:
   
   > ### Name: as_image
   > ### Title: Create an 'Image' object
   > ### Aliases: as_image
   > 
   > ### ** Examples
   > 
   > img <-
   + as_image(rnorm(150 * 150 * 3),
   +          dim = c(150, 150, 3),
   +          colormode = 'Color')
   Error in loadNamespace(x) : there is no package called ‘EBImage’
   Calls: as_image ... loadNamespace -> withRestarts -> withOneRestart -> 
doWithOneRestart
   Execution halted
   * checking PDF version of manual ... [12s/12s] OK

Looking at as_image.Rd in 
https://github.com/NEPEM-UFSC/pliman/blob/24a1781073f9b1a3141002f0985b0542b1f7178d/man/as_image.Rd
we see that you do have an \donttest{} there but that alone does not protect
you. Instead of

   \examples{
   \donttest{
   library(pliman)
   img <-
   as_image(rnorm(150 * 150 * 3),
            dim = c(150, 150, 3),
            colormode = 'Color')
   plot(img)
   }

I would do something like

  if (interactive() && requireNamespace("EBImage", quietly=TRUE)) {
    library(pliman)
    img <- as_image(rnorm(150 * 150 * 3), dim = c(150, 150, 3), colormode = 
'Color')
    plot(img)
  }

where you could of course put that condition into a helper function.

Hope this helps,  Dirk

-- 
dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to