项目作者: HaydenMacDonald

项目描述 :
R Markdown templates for tidy data analysis and case study analysis
高级语言: R
项目地址: git://github.com/HaydenMacDonald/hmdrmd.git
创建时间: 2018-12-04T11:59:11Z
项目社区:https://github.com/HaydenMacDonald/hmdrmd

开源协议:GNU General Public License v3.0

下载


hmdrmd

Travis build status

This is a collection of R Markdown1 templates created for data analysis project workflows including:

  • Tidy Analysis
  • Case Study Analysis

Installation

  1. if (!requireNamespace("remotes")) install.packages("remotes")
  2. remotes::install_github("HaydenMacDonald/hmdrmd")

Usage

In order to render pdf documents from R Markdown files, you will need LaTeX. If you have never installed a LaTex distribution, you can do so using the TinyTeX package.

  1. install.packages("tinytex")
  2. tinytex::install_tinytex()

Once hmdrmd and tinytex are installed, you can access these templates in RStudio through the following path:

File > New File > R Markdown… > From Template.

New R Markdown > From Template

Defaults for pdf output are controlled through the YAML header. The default main font (mainfont) and code font (monofont) are set to CMU Serif Roman and Fira Code Medium, respectively. Remove or change these options from the YAML header to customize your document’s font.

Templates

Tidy Analysis

A basic template for tidy data analysis for educational or professional use. This R Markdown file outputs a pdf for reporting results.

The document is broken into six sections, including:

  • Packages
  • Import
  • Wrangle
  • Visualize
  • Model
  • Communicate / Export

Example of Tidy Analysis template


Case Study Analysis

R Markdown template for case study analyses based on William Ellet’s case study guide in The Case Study Handbook, Revised Edition: A Student’s Guide (2018)2. This template is intended to be used by students in educational and research environments involving case analyses.

This R Markdown file outputs a pdf report with settings adjusted in the YAML header.

The document contains 12 essential steps for case study analysis, separated into 6 sections:

  • Role and Scenario
  • Criteria
  • Analysis
  • Evaluation
  • Uncertainties
  • Action Plan

Example of Case Study Analysis template



Help

Submit issues here on GitHub.

If you are interested in extending the functionality of this package, fork this repository, make your changes and submit them as a pull request.

Author

This package was authored by Hayden MacDonald, but borrows heavily from the work by JJ Allaire and Yihui Xie in rmarkdown1.

License

The hmdrmd and rmarkdown packages are licensed under the GPLv3 (http://www.gnu.org/licenses/gpl.html).

References & Footnotes

1: Allaire, JJ., Xie, Y., McPherson, J., Luraschi J., Ushey, K., Atkins, A., Wickham, H., Cheng, J., Chang, W., & Iannone, R. (2017). rmarkdown: Dynamic documents for R. R package version 1.11. URL: https://CRAN.R-project.org/package=rmarkdown

2: Ellet, W. (2018). The case study handbook, revised edition: A student’s guide. Boston, Massachussets: Harvard Business Review Press.