source("README.R", TRUE) knitr::opts_chunk$set(echo = TRUE, fig.align = "center", out.width = "100%")
####################### ## Get Project Paths ## ####################### path_project <- getwd() while (length(grep("test", path_project))>0) path_project <- dirname(path_project) devtools::load_all(path_project) ############################# ## Get Package DESCRIPTION ## ############################# library(desc) target <- file.path(path_project, "DESCRIPTION") desc_obj <- description$new(target) ########################## ## Set System Variables ## ########################## package_url <- desc_obj$get_field("BugReports") %>% stringr::str_remove("/issues$") package_name <- desc_obj$get_field("Package") package_repo <- stringr::str_extract_all(package_url, "[^/]+(?://[^/]*)*")[[1]][2:3] %>% paste0(collapse ="/") Sys.setenv(CI_PROJECT_NAME = package_name) Sys.setenv(CI_PROJECT_URL = package_url) #################### ## Construct URLs ## #################### travis_url <- paste0("https://travis-ci.org/", package_repo) pipeline_url <- paste0(travis_url, ".svg?branch=master") mybinder_url <- "http://mybinder.org/badge.svg" codecov_url <- paste0("https://codecov.io/github/", package_repo, "/", "?branch=master") covr_url <- paste0("https://codecov.io/gh/", package_repo, "/branch/master/graph/badge.svg") binder_url <- paste0("https://mybinder.org/v2/gh/", package_repo, "/master?urlpath=rstudio")
r package_name
r desc_obj$get_field("Title")
knitr::include_graphics("https://i.imgur.com/RLEQkhe.png")
r desc_obj$get_field("Description")
git-flow
approach in your development cycle. inception
.r package_name
content to the new reposetory.r paste0(package_name,".Rproj")
file to <package-name>.Rproj
.DESCRIPTION
file, and edit the following fields:tidylab.
prefix.README.Rmd
delete the Useage Section.README.Rmd
by clicking the Knit button.inception
branch.You can install r package_name
by using:
install.packages("devtools") devtools::install_github("`r package_repo`")
plot_function_dependencies(package_name)
plot_datasets_overview(x = list(mtcars = mtcars, iris = iris))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.