fdschneider / caspr

Cellular Automata for Spatial Pressure in R
MIT License
4 stars 0 forks source link

Unable to access index for repository; cannot open URL #45

Open Bonesaw-McGraw opened 4 years ago

Bonesaw-McGraw commented 4 years ago

I have not been able to install caspr, and I was hoping that you might be able to explain my error. When I follow the instructions for installation, it tells me that there are more recent versions available, and it asks me to select an option. I have selected option #1 (All) in the output below, but I tried all of the other options and everything leads me to the same error message, saying that R is 'unable to access index for repository' and 'cannot open URL'. I tried simply copy/pasting the URL listed in the output (https://github.com/fdschneider/src/contrib/PACKAGES), but it takes me to a '404: not found' page. Is there a problem with the URL that R is attempting to open? It doesn't look like other people have had this problem.

Any idea why I am getting this error, and what I can do to resolve this issue? Any help that you can provide would be greatly appreciated.


devtools::install_github("fdschneider/caspr") Downloading GitHub repo fdschneider/caspr@master These packages have more recent versions available. It is recommended to update all of them. Which would you like to update?

1: All
2: CRAN packages only
3: None
4: iterators (1.0.11 -> 1.0.12) [CRAN]

Enter one or more numbers, or an empty line to skip updates: 1

moments (NA -> 0.14 ) [CRAN] iterators (1.0.11 -> 1.0.12) [CRAN] Skipping 1 packages not available: SDMTools Skipping 1 packages ahead of CRAN: foreach Installing 3 packages: moments, SDMTools, iterators Error: Failed to install 'caspr' from GitHub: (converted from warning) unable to access index for repository https://github.com/fdschneider/src/contrib: cannot open URL 'https://github.com/fdschneider/src/contrib/PACKAGES'

alexgenin commented 4 years ago

Hello, I'm not the maintainer but did some work on caspr.

Github caspr is a source package and from your message it seems R is trying to install it using install.packages(), which only works for pre-built packages. Can you try to run devtools::install_github("fdschneider/caspr"), but say no to updating the packages ? (choice 3)

Alternatively, you can update all your packages beforehand, using update.packages(ask = FALSE, checkBuilt = TRUE), then run the above command to install the caspr from github.