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

Lorenzo Busetto lbusett at gmail.com
Thu Oct 20 22:14:42 CEST 2016


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:

> checking dependencies in R code ... WARNING 'loadNamespace' or
'requireNamespace' call not declared from: ‘gWidgetsRGtk2’

I found out I can avoid both problems  using the "pacman" package in my
Main:

> if (!pacman::p_exists("gWidgetsRGtk2", local = TRUE))
{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:

>
> Lorenzo,
>
> Your mails are too long (at least for my attention span, and available
> time)
> and very poorly formatted. Many of us read email in text-only terminals.
>
> On 20 October 2016 at 11:05, Lorenzo Busetto wrote:
> | I also have a (maybe stupid) question on this: in theory, I could write
> | this "configuration check" also as a "R" function which sends out
> "system"
> | commands if it detects a Linux environment (configuring the commands on
> the
>
> No, just use
>
>    Sys.info()[["sysname"]]
>
> and see `help(Sys.info()`.  R can tell you a lot about the environment.
>
> Dirk
>
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
>

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list