source("./.app/README/helpers.R") pkgs <- c("desc", "devtools", "usethis") try(remotes::install_cran(pkgs), silent = TRUE) knitr::opts_chunk$set( echo = FALSE, message = FALSE, warning = FALSE, results = 'hide', fig.align = "center", out.width = "100%" )
# Package Paths path_project <- getwd() while (length(grep("test", path_project))>0) path_project <- dirname(path_project) pkgload::load_all(rprojroot::find_rstudio_root_file(), helpers = FALSE) # Package Metadata library(desc) target <- file.path(path_project, "DESCRIPTION") desc_obj <- description$new(target) package_name <- desc_obj$get_field("Package") package_repo <- tic::ci_get_slug() #################### ## Construct URLs ## #################### travis_href <- paste0("https://travis-ci.org/", package_repo) travis_src <- paste0(travis_href, ".svg?branch=master") covr_href <- paste0("https://codecov.io/github/", package_repo, "/", "?branch=master") covr_src <- paste0("https://codecov.io/gh/", package_repo, "/branch/master/graph/badge.svg") pkgdown_href <- desc_obj$get_urls()[[1]] pkgdown_src <- generate_shield_src(label = "Package Website", message = "Click-Here", color = "9cf") shiny_href <- "https://harell.shinyapps.io/caret-explainer/" shiny_src <- generate_shield_src(label = "Shiny Dashboard", message = "Click-Here", color = "ff8c69")
r package_name
usethis::use_badge("Shiny Dashboard", shiny_href, shiny_src) usethis::use_badge("Package Website", pkgdown_href, pkgdown_src) usethis::use_badge("Travis Status", travis_href, travis_src) usethis::use_badge("Code Coverage Status", covr_href, covr_src)
r desc_obj$get_field("Title")
knitr::include_graphics("https://i.imgur.com/RLEQkhe.png")
The dashboard supplied with this package is a candidate for Shiny Contest 2020.
See the package website for more information.
You can install r package_name
by using:
install.packages("devtools") devtools::install_github("`r package_repo`")
fs::dir_tree(path_project)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.