Skip to content

Instantly share code, notes, and snippets.

@tjmahr
Last active May 30, 2020 01:05
Show Gist options
  • Save tjmahr/8a1535fb7c89c4f6c59c57affaba2353 to your computer and use it in GitHub Desktop.
Save tjmahr/8a1535fb7c89c4f6c59c57affaba2353 to your computer and use it in GitHub Desktop.
maybe reinstall the github packages?
df <- as.data.frame(installed.packages(fields = c("RemoteType", "Repository")))
to_reinstall <- df[df$Repository %in% "CRAN", "Package"]
install.packages(to_reinstall)
install.packages("remotes")
packages <- installed.packages(
fields = c("GithubUsername", "GithubRepo", "GithubSubdir")
)
from_github <- packages[
!is.na(packages[, "GithubRepo"]),
c("GithubUsername", "GithubRepo", "GithubSubdir")
]
repos <- paste0(
from_github[, 1], "/",
from_github[, 2],
ifelse(is.na(from_github[, 3]), "", paste0("/", from_github[, 3]))
)
lapply(repos, remotes::install_github, upgrade = "always", build = FALSE, force = TRUE, type = "binary")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment