rpackagedevtoolscranr-usethis

Unable to understand 1 note in devtools::check() caused by a platform-specific device (X11)


I'm trying to upload my package to CRAN and using devtools::check(), but I'm not able to understand why the function is showing 1 note.

The code is available in my repository. The check function shows the following message:


Duration: 44.3s

> checking R code for possible problems ... NOTE
  Found an obsolete/platform-specific call in the following function:
    'consulta_pedidos'
  Found the platform-specific device:
    'X11'
  dev.new() is the preferred way to open a new device, in the unlikely
  event one is needed.

0 errors √ | 0 warnings √ | 1 note x

Does anyone know the reason of this? Thank you in advance!


Solution

  • I'm pretty sure this is a false positive, from this code:

    I haven't analyzed this in detail, but I think what's happening is that:

    This might be worth submitting as a bug report, or at least for discussion (either on r-devel@r-project.org or r-package-devel@r-project.org).