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 <rshep...@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@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 ______________________________________________ R-help@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.