####################### ## Get Package Paths ## ####################### path_project <- getwd() while (length(grep("test", path_project))>0) path_project <- dirname(path_project) project_name <- gsub(".Rcheck$", "", basename(path_project)) ############################# ## Get Package DESCRIPTION ## ############################# library(desc) target <- file.path(path_project, "DESCRIPTION") desc_obj <- description$new(target) package_name <- desc_obj$get_field("Package") #################### ## Construct URLs ## #################### travis_url <- paste0("https://travis-ci.org/tidylab/", project_name) pipeline_url <- paste0(travis_url, ".svg?branch=master") codecov_url <- paste0("https://codecov.io/github/tidylab/", project_name, "?branch=master") covr_url <- paste0("https://codecov.io/gh/tidylab/", project_name, "/branch/master/graph/badge.svg")
r project_name
r desc_obj$get_field("Title")
r desc_obj$get_field("Description")
r package_name
is part of tidylab
. The easiest way to
install it, is by installing tidylab
:
# Install all tidylab packages # install.packages("devtools") devtools::install_github("tidylab/tidylab")
Alternativly, you can install only r package_name
by using:
# Install only `r package_name` # install.packages("devtools") devtools::install_github("tidylab/`r package_name`")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.