[Rd] install packages with missing pkg argument

Enrico Schumann e@ @end|ng |rom enr|co@chum@nn@net
Mon Jul 29 14:05:53 CEST 2019


Maybe related to this?

    https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17556

>>>>> "Antoine" == Ant F <antoine.fabri using gmail.com> writes:

    Antoine> Dear all,
    Antoine> The help for `?install.packages` decribes, in the `pkg` argument
    Antoine> description :

    >> If this is missing, a listbox of available packages is presented where
    Antoine> possible in an interactive R session.

    Antoine> In fact running it with a missing argument triggers an error :

    Antoine> install.packages()
    >> Error in install.packages : argument "pkgs" is missing, with no default

    Antoine> What however doesn't trigger an error is callinginstall.packages on a zero
    Antoine> length character :

    Antoine> install.packages(character(0))

    Antoine> On my colleague's R 3.5.1 windows installation it shows the listbox of
    Antoine> available packages, on my 3.6.0 installation it pauses for a couple seconds
    Antoine> and doesn't do anything.

    Antoine> A character vector of length zero is what you get when you compute an empty
    Antoine> `setdiff` or `intersection`, so it was very surprising to us to see
    Antoine> something popup where we were expecting a vector of missing packages to be
    Antoine> installed (or none if there was no missing package).

    Antoine> I believe having the function work as advertised with a proper missing
    Antoine> argument, and having it do nothing silently when the argument is of length
    Antoine> zero, would make more sense.

    Antoine> Best regards,

    Antoine> Antoine


-- 
Enrico Schumann
Lucerne, Switzerland
http://enricoschumann.net



More information about the R-devel mailing list