I am able to access R packages on my laptop, but not on my desktop computer. Both are Macs, both running OS10.13.6 High Sierra. When I open package installer on the laptop and click"Get list" it provides the usual list of packages. On the desktop computer (Mac Pro Tower, 2012) the following message pops up in the R console window: "Warning: unable to access index for repository https://cran.stat.auckland.ac.nz/bin/macosx/contrib/4.2: cannot open URL 'https://cran.stat.auckland.ac.nz/bin/macosx/contrib/4.2/PACKAGES' The same happens if I type >install.packages() into the R console window. A list of packages appears on the laptop, but on the desktop computer this happens:> install.packages()Warning: unable to access index for repository https://cran.stat.auckland.ac.nz/src/contrib: cannot open URL 'https://cran.stat.auckland.ac.nz/src/contrib/PACKAGES' Error in install.packages() : argument "pkgs" is missing, with no default> install.packages(sf)Error in install.packages(sf) : object 'sf' not found Both computers are online, and on both of them I can see the list of packages here: https://cran.stat.auckland.ac.nz/bin/macosx/contrib/4.2/PACKAGES Is there a way to directly download the packages? Many thanks! Liz Slooten Professor Emeritus, University of Otago, New Zealand [[alternative HTML version deleted]]
Hi Liz, Try: install.packages("sf") Jim On Mon, Jul 18, 2022 at 8:37 PM Elisabeth Slooten <liz.slooten at otago.ac.nz> wrote:> > I am able to access R packages on my laptop, but not on my desktop computer. Both are Macs, both running OS10.13.6 High Sierra. When I open package installer on the laptop and click"Get list" it provides the usual list of packages. On the desktop computer (Mac Pro Tower, 2012) the following message pops up in the R console window: > "Warning: unable to access index for repository https://cran.stat.auckland.ac.nz/bin/macosx/contrib/4.2: > cannot open URL 'https://cran.stat.auckland.ac.nz/bin/macosx/contrib/4.2/PACKAGES' > > The same happens if I type >install.packages() into the R console window. A list of packages appears on the laptop, but on the desktop computer this happens: > > > install.packages() > Warning: unable to access index for repository https://cran.stat.auckland.ac.nz/src/contrib: > cannot open URL 'https://cran.stat.auckland.ac.nz/src/contrib/PACKAGES' > Error in install.packages() : argument "pkgs" is missing, with no default > > > install.packages(sf) > Error in install.packages(sf) : object 'sf' not found > > Both computers are online, and on both of them I can see the list of packages here: https://cran.stat.auckland.ac.nz/bin/macosx/contrib/4.2/PACKAGES > > Is there a way to directly download the packages? > > Many thanks! > > Liz Slooten > Professor Emeritus, University of Otago, New Zealand > > [[alternative HTML version deleted]] > > ______________________________________________ > 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.
On Sun, 17 Jul 2022 22:35:23 +0000 Elisabeth Slooten <liz.slooten at otago.ac.nz> wrote:> Both computers are online, and on both of them I can see the list of > packages here: > https://cran.stat.auckland.ac.nz/bin/macosx/contrib/4.2/PACKAGESThere seems to be something wrong with R's ability to download files from the Internet on one of your machines. Does download.file('https://cran.stat.auckland.ac.nz/bin/macosx/contrib/4.2/PACKAGES', 'PACKAGES') provide a useful error message? Is the R version the same on both computers? Any differences in the sessionInfo() output? Anything suspect in .Rprofile? Try asking at r-sig-mac at r-project.org.> Is there a way to directly download the packages?You can always visit the package web page (e.g. <https://CRAN.R-project.org/package=sf>) to get the download link, and since you're on a macOS machine, you can download the binary. Unfortunately, it's up to you to resolve the dependencies manually. To do that semi-manually, you can download https://cran.r-project.org/web/packages/packages.rds, read it using readRDS and feed it as the db argument to tools::package_dependencies('sf', db, recursive = TRUE) in order to know which packages to download. -- Best regards, Ivan