Skip to content
Easily access R templates for the Urban Institute
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R Update README and fix #1. Oct 17, 2018
inst Update README and fix #1. Oct 17, 2018
man Update README and fix #1. Oct 17, 2018
.Rbuildignore Add construct_shiny(). Add open argument to several use_*() functions. Sep 14, 2018
.gitignore Test all construct_*() functions. Fix some incorrect syntax. Add *_in… Sep 24, 2018
CODE_OF_CONDUCT.md Add license and code of conduct. Sep 14, 2018
DESCRIPTION Initial commit of urbntemplates. Sep 11, 2018
LICENSE.md
NAMESPACE Test all construct_*() functions. Fix some incorrect syntax. Add *_in… Sep 24, 2018
NEWS.md Initial commit of urbntemplates. Sep 11, 2018
README.Rmd Update README and fix #1. Oct 17, 2018
README.md Update README and fix #1. Oct 17, 2018
urbntemplates.Rproj

README.md

urbntemplates

NOTE: This project is still under active development.

NOTE: All publications still need to go throught the normal COMM process.

library(urbntemplates) contains tools and templates for managing analysis workflows at the Urban Institute. It heavily relies on functions and functionality from usethis.

Installation

You can install the latest version of urbntemplates from GitHub:

# install.packages("devtools")
devtools::install_github("UrbanInstitute/urbntemplates")

Usage

library(urbntemplates) contains three families of functions:

start_project() generates a new project with a .Rproj, README, and .gitignore at the specified location on a machine.

construct_*() functions add multiple, related templates and documents to a project directory or sub-directory. The templates and documents are related in important ways. For example, construct_shiny() adds app.R and an R Shiny specific CSS. It also adds instructions for using the selected template.

use_*() functions add individual templates and documents to a project directory or sub directory.

A sensible workflow is:

  1. Start a new project and create a .Rproj by submitting urbntemplates::start_project(). This will create and open a new .Rproj.
  2. Inside the .Rproj, add the necessary documents for a part of a project, like a Shiny application, with a construct_*() function.
  3. Add any desired remaining templates or documents with use_*() functions.

Note:

construct_*() functions are useful on their own. If you have an existing project, just use construct_*() to add all of the necessary templates and documents for creating a product like a branded slide show or an R Markdown web report.

start function

  • start_project()

construct functions

  • construct_shiny_app()
  • construct_fact_sheet_html()
  • construct_fact_sheet_pdf()
  • construct_slide_show()
  • construct_web_report()

use functions

  • use_content()
  • use_css()
  • use_fact_sheet_html()
  • use_fact_sheet_pdf()
  • use_git_ignore_urbn()
  • use_instructions()
  • use_iterate()
  • use_preamble()
  • use_revealjs()
  • use_shiny_app()
  • use_readme_readme()
  • use_web_report()

License

Code released under the GNU General Public License v3.0.

Code of conduct

Please note that the "urbntemplates" project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

You can’t perform that action at this time.