Skip to content
Prev 5819 / 12125 Next

[R-pkg-devel] Error in CHECK caused by dev.off()

Hi Sebastian,

Sebastian Meyer wrote on 2020-07-23 16:52:
THX!
Ah! For years I was wondering where the PDF comes from.
OK, now I have:
if (file.exists("myfile") & !is.null(dev.list()["png"]) {
 ? invisible(dev.off(dev.list()["png"]))
}
You made my day. No error in check() any more.
Ouch!
Done.
It was already in \donttest{} but check() ignored that.
It did. Additionally I've learned a new abbreviation...

Helmut