[Rd] install packages with missing pkg argument

Hugh Parsonage hugh@p@r@on@ge @end|ng |rom gm@||@com
Mon Jul 29 13:59:01 CEST 2019


Are you running that command in RStudio? And do you get the documented
results when you run utils::install.packages() rather than just
install.packages()

If yes, then the function is likely working as advertised and you've
mixed up the R and RStudio versions


On 29/07/2019, Ant F <antoine.fabri using gmail.com> wrote:
> Dear all,
>
> The help for `?install.packages` decribes, in the `pkg` argument
> description :
>
>> If this is missing, a listbox of available packages is presented where
> possible in an interactive R session.
>
> In fact running it with a missing argument triggers an error :
>
> install.packages()
>> Error in install.packages : argument "pkgs" is missing, with no default
>
> What however doesn't trigger an error is callinginstall.packages on a zero
> length character :
>
> install.packages(character(0))
>
> On my colleague's R 3.5.1 windows installation it shows the listbox of
> available packages, on my 3.6.0 installation it pauses for a couple seconds
> and doesn't do anything.
>
> A character vector of length zero is what you get when you compute an empty
> `setdiff` or `intersection`, so it was very surprising to us to see
> something popup where we were expecting a vector of missing packages to be
> installed (or none if there was no missing package).
>
> I believe having the function work as advertised with a proper missing
> argument, and having it do nothing silently when the argument is of length
> zero, would make more sense.
>
> Best regards,
>
> Antoine
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



More information about the R-devel mailing list