Rich Shepard
2020-May-14 17:05 UTC
[R] Automating package updates after major version change
On Sun, 26 Apr 2020, Sarah Goslee wrote:> Not so coincidentally, I just worked thru this for myself. > http://numberwright.com/2020/04/clean-and-new/Sarah, This isn't working for me on Slackware-14.2/x86_64. My R library is in /usr/lib64/R/library/ and I copied the contents to a text file, one package per line. Using the filename, packagelist, as an argument to install.packages() fails:> install.packages(packagelist)Error in install.packages(packagelist) : object 'packagelist' not found Adding quotes didn't help. Creating a script, newversionupdate.R, containing the line, install.packages(packagelist) and sourcing it also failed. What might I be doing incorrectly? Regards, Rich
Jeff Newmiller
2020-May-14 17:50 UTC
[R] Automating package updates after major version change
Why are you mucking with the system-level library? It is quite unusual to have a use-case in which you should not be adjusting your personal library. On May 14, 2020 10:05:53 AM PDT, Rich Shepard <rshepard at appl-ecosys.com> wrote:>On Sun, 26 Apr 2020, Sarah Goslee wrote: > >> Not so coincidentally, I just worked thru this for myself. >> http://numberwright.com/2020/04/clean-and-new/ > >Sarah, > >This isn't working for me on Slackware-14.2/x86_64. My R library is in >/usr/lib64/R/library/ and I copied the contents to a text file, one >package >per line. > >Using the filename, packagelist, as an argument to install.packages() >fails: >> install.packages(packagelist) >Error in install.packages(packagelist) : object 'packagelist' not found > >Adding quotes didn't help. > >Creating a script, newversionupdate.R, containing the line, >install.packages(packagelist) > >and sourcing it also failed. > >What might I be doing incorrectly? > >Regards, > >Rich > >______________________________________________ >R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide >http://www.R-project.org/posting-guide.html >and provide commented, minimal, self-contained, reproducible code.-- Sent from my phone. Please excuse my brevity.
Rich Shepard
2020-May-14 18:15 UTC
[R] Automating package updates after major version change
On Thu, 14 May 2020, Jeff Newmiller wrote:> Why are you mucking with the system-level library? It is quite unusual to > have a use-case in which you should not be adjusting your personal > library.Jeff, I'm the only user so there's no difference. Regards, Rich
Sarah Goslee
2020-May-14 18:15 UTC
[R] Automating package updates after major version change
Hi Rich, Note that install.packages requires "character vector of the names of packages whose current versions should be downloaded from the repositories" as stated in the help file. If you aren't going to do it the way I did, then you need to read your text file into R and create that character vector there. Sarah On Thu, May 14, 2020 at 1:06 PM Rich Shepard <rshepard at appl-ecosys.com> wrote:> > On Sun, 26 Apr 2020, Sarah Goslee wrote: > > > Not so coincidentally, I just worked thru this for myself. > > http://numberwright.com/2020/04/clean-and-new/ > > Sarah, > > This isn't working for me on Slackware-14.2/x86_64. My R library is in > /usr/lib64/R/library/ and I copied the contents to a text file, one package > per line. > > Using the filename, packagelist, as an argument to install.packages() fails: > > install.packages(packagelist) > Error in install.packages(packagelist) : object 'packagelist' not found > > Adding quotes didn't help. > > Creating a script, newversionupdate.R, containing the line, > install.packages(packagelist) > > and sourcing it also failed. > > What might I be doing incorrectly? > > Regards, > > Rich > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.-- Sarah Goslee (she/her) http://www.numberwright.com
Rich Shepard
2020-May-14 18:18 UTC
[R] Automating package updates after major version change
On Thu, 14 May 2020, Sarah Goslee wrote:> Note that install.packages requires "character vector of the names of > packages whose current versions should be downloaded from the > repositories" as stated in the help file.Sarah, Ah, yes. I missed that.> If you aren't going to do it the way I did, then you need to read your > text file into R and create that character vector there.I tried to translate your MacOS R commands to my linux system but failed in my attempts. I'll create a one-line list of packages, demarked as strings, and read that into R as a vector. Thanks, Rich