#' Update Packages from Github
#' @export
#' @description Updates packages that have been installed from public Github repositories
update_github_pkgs <- function() {
check <- "SKTools" %in% .packages()
if (check) {
detach("package:SKTools", unload = TRUE)
}
utils::installed.packages() %>%
tibble::as_tibble() %>%
.$Package %>%
purrr::set_names() %>%
purrr::map(utils::packageDescription) %>%
purrr::map(~ paste0(.$GithubUsername, "/", .$GithubRepo)) %>%
purrr::map_if(nchar(.) > 3, purrr::safely(~ devtools::install_github(.)))
if (check) {
library("SKTools")
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.