Dear all, The help for `?install.packages` decribes, in the `pkg` argument description :> If this is missing, a listbox of available packages is presented wherepossible 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 defaultWhat 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]]
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 at 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 at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >
Maybe related to this? https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17556>>>>> "Antoine" == Ant F <antoine.fabri at 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
Indeed Hugh, apologies for the oversight, I've reported this to Rstudio, as I believe it is problematic to get an irrelevant help file when calling `?install.packages`. https://github.com/rstudio/rstudio/issues/5154 Best regards, Antoine Le lun. 29 juil. 2019 ? 13:59, Hugh Parsonage <hugh.parsonage at gmail.com> a ?crit :> 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 at 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 at r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-devel > > >[[alternative HTML version deleted]]
On 29/07/2019 7:39 a.m., Ant F 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. >The change you are requesting is listed as having been done in the NEWS for 3.6.0... Duncan Murdoch
Indeed it's a RStudio issue as diagnosed by Hugh, and is still an issue with the latest version. Le lun. 29 juil. 2019 ? 15:02, Duncan Murdoch <murdoch.duncan at gmail.com> a ?crit :> On 29/07/2019 7:39 a.m., Ant F 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. > > > > The change you are requesting is listed as having been done in the NEWS > for 3.6.0... > > Duncan Murdoch >[[alternative HTML version deleted]]