Open jasonjb82 opened 4 years ago
You need to add it to the repos
R option; e.g.
options(repos = c(getOption("repos"), ROpenSci = "http://packages.ropensci.org"))
After doing this you'll likely need to call packrat::snapshot()
to update the lockfile as well.
Thanks for this, Kevin.
I tried adding the repo which now shows me this when I type getOption("repos")
CRAN ROpenSci
"https://cran.rstudio.com/" "http://packages.ropensci.org"
However, when I call packrat::snapshot()
again, it still gives me the same error
Are you working on macOS? The CRAN binary repository is currently broken and that is affecting Packrat as well.
No, I use a Windows 10 machine. Just wondering how exactly this is affecting me adding this repo and creating a new snapshot.
The problem is that the installed package does not indicate it is from a package repository:
> desc <- read.dcf(
+ system.file("DESCRIPTION", package = "rnaturalearthhires"),
+ all = TRUE
+ )
> desc$Repository
NULL
You can install the development version of Packrat if you need to work around this issue:
remotes::install_github("rstudio/packrat")
And note that you'll still need to set the repos
option to list both of your package repositories.
Thanks @kevinushey, I'll try this.
I am trying to take a snapshot of my project that includes the following package
install.packages("rnaturalearthhires", repos = "http://packages.ropensci.org", type = "source")
Unfortunately, when I run
packrat:status()
, I get the following errorDo you know how I could add this repo so I can add this package to my snapshot?