Closed Cervangirard closed 2 years ago
We could use something like this to get remotes for DESCRIPTION files
pkg <- attachment::att_from_description() test <- lapply(pkg, function(x){ packageDescription(x) }) %>% setNames(pkg) cran_or_not <- lapply(test, function(x){ print(x) x[["Repository"]] }) %>% sapply(., is.null) github_pkg <- names(cran_or_not[cran_or_not]) cran_pkg <- names(cran_or_not[!cran_or_not]) github_repo <- lapply(github_pkg,function(x) { desc <- test[[x]] tolower(paste(desc$RemoteUsername, desc$RemoteRepo, sep = "/")) }) %>% setNames(github_pkg) lapply(cran_pkg, install.packages) lapply(github_repo, remotes::install_github)
Please verify that the proposition works and adds the correct field in DESCRIPTION
We could use something like this to get remotes for DESCRIPTION files