Skip to content
Prev 1154 / 12125 Next

[R-pkg-devel] Submitting to CRAN a package depending on RGtk2

Ok. Duly noted. I'll  be more concise and avoid even simple formatting
(seems italics broke my last post to pieces). I'll try again.

My main problem is that, if I have "gWidgetRGtk2" as an imported package,
installation on Windows from github crashes RStudio while trying to install
GTK+ libraries (although I have no ERRORS nor WARNINGS in R CMD check).

If I remove the dependency and ask users to install  "gWidgetsRGtk2"
beforehand (which doesn't crash) I obviously get this WARNING:
'requireNamespace' call not declared from: ?gWidgetsRGtk2?

I found out I can avoid both problems  using the "pacman" package in my
Main:
{pacman::p_load("gWidgetsRGtk2")}

In this way,  ?gWidgetsRGtk2? is  installed only at first execution of my
Main, and I'm up and running.

Is this a viable solution (clearly, provided I ask permission to the user
before installing with p_load)   ?

Thanks in advance,

Lorenzo

PS: better ?
On 20 October 2016 at 15:34, Dirk Eddelbuettel <edd at debian.org> wrote: