Science Score: 18.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.3%) to scientific vocabulary
Repository
SCRS Statistical Report Template using bookdown
Basic Info
- Host: GitHub
- Owner: scrs-msu
- Language: TeX
- Default Branch: master
- Homepage: https://scrs-msu.github.io/scrsreport/
- Size: 1010 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
scrsreport
What does scrsreport do?
scrsreport adds a SCRS statistical report template to RStudio (>= 1.1.28) when you click "New Project... -> New Directory". It creates a bookdown skeleton with gitbook (HTML), pdfbook (PDF) and MS Word (DOCX) templates matched with SCRS report templates originally created in 2016. This will help all reports have a consistent, professional look, as well as utilizing the benefits of bookdown (which is an enhanced version of R Markdown) including cross-references (section, figures, tables), citations, and math equations.
Installation
You need remotes package to install this package directly from its GitHub repo.
remotes::install_github("scrs-msu/scrsreport")
It will install all dependencies including bookdown and its dependencies. You may be asked to update your existing packages if needed.
Usage
This package does not have any public functions you can call or documentation you can read. In fact, you hardly see any difference unless you do the following:
- In Rstudio, click on New Project icon in RStudio or File - New Project...
- In Create Project window, choose New Directory
- In Project Type window, you will see SCRS Report Project using bookdown with the SCRS icon
- Type the project name and the folder you want to create the project in

A new project with a set of template files will be created. The three most important files will be already open in the Source pane:
- README.rd: the README file where you give a short description of what project is about
- _output.yml: the configurations for the HTML format (
bookdown::gitbook) and PDF format (bookdown::pdf_book). The phrase Most Important Study should be changed to the title of the report (that matches the title in index.Rmd file. - index.Rmd: the main R Markdown file. This is a regular R Markdown file with a populated YAML header.
- title: The title of the report. It should match with the title in _output.yml.
- subtitle: The name of the client should be added with their degree abbreviation.
- author: List of statisticians' names with their degree abbreviations.
- authors: Primary statistician's namem with their degree abbreviation (for PDF reports)
- director: SCRS Director's name with their degree abbreviation.
- secondary: Secondary statistician(s)' names with their degree abbreviation.
- abstract: Disclaimers, only change the primary statisticians name after the copyright symbol.
- prelim: yes if it is a draft ("draft" will be added to title as well as a disclaimer), and no if it is the final version.
- date: pre-populated to generate the date of report compilation.
- titlepage: yes to include the title page, no to remove it.
- msucolor: yes to use blue and gold as the color theme of the report.
- twoside (only applied to PDF version): affects the header and page margins to fit two-sided prints.
- spacing (only applied to PDF version): the number of spaces between lines.
- bibliography: List of the BibTeX files, default is [scrs-ref.bib, packages.bib]. The packages.bib file is generated automatically by the packages code chunk.
- biblio-style (only applied to PDF version): citation style. Default is American Psychological Association (APA) style.
- Note: citation style for the gitbook HTML is defined in _output.yml (
pandoc_args). You can download the citation style at citation-style-language project and change the path and file name in _output.yml accordingly. - link-citations: whether to create a link at the citation to the corresponding bibliography item.
- colorlinks (only applied to PDF version): whether to color URLs in the PDF version.
- site: tell RStudio to treat the project as a bookdown project (changes in Build pane, Addins, etc.).
- documentclass (only applied to PDF version): treat the document as the LaTeX article class, then "Chapter" will not be used at the first level header.
Why bookdown?
Several generations of SCRS research assistants have developed and maintained several templates for a good-looking statistical report. The LaTeX style file was first created by Michael Lerch in 2015. In 2017, Kenneth Flagg and Jordan Schupbach created two sets of templates for R Markdown documents, one for PDF compilation and another for HTML compilation. Since then, Flagg and Tan Tran have refined and updated the templates to reflect changes in SCRS' support grant, SCRS logos, and the periods when SCRS had a co-director and an assistant director. As of September 2019, there were three separate report templates in the Box Templates and Tools folder (internal link), making it tedious to use, train, and modify when needed. Also, reverting a report originally written for one format to another format is not simple because of the difference in the source file (LaTeX knitr vs. R Markdown). Moreover, since 2018, SCRS decided to offer an HTML version of draft reports to clients instead of PDF because of its many benefits, such as it can display visualizations without the limit of a paper, it is easier for the clients to re-use figures and R codes. However, R Markdown has many shortcomings and annoying bugs when writing professional documents (figure referencing, equations, citations, etc.). Many of these limitations were alleviated by the inclusion of a Word DOCX version in January 2020, which can produce documents that meet accessibility standards and do not have the issue with figures floating to the top of the page.
bookdown is an open-source project that is built on R, Markdown, and pandoc by Yihui Xie. It aims to facilitate writing professional documents with the ability to compile one source file to multiple output formats (PDF, HTML, EPUB, Word, etc.). The strengths of bookdown that suits the purpose of a SCRS HTML report include, but not limited to:
- Write your report in simple Markdown markups.
- Writing equations in LaTeX syntax with consistent and stable results.
- Cross-references are implemented for equations, theorems, figures, tables, and sections.
- Citations with BibTeX.
- Word accessibility checking tools can be used to generate documents that meet University standards and are easy for clients to use.
- PDF version of the report can be created if needed.
- HTML and PDF templates can be used to create a nice typesetting report.
Known Bugs and Missing Features
- RStudio has a bug that prevents it to display the compiled gitbook correctly when a single HTML document is generated (projectname.html) instead of multiple HTML documents with index.html is the portal as bookdown is originally designed for. See Issue #5371 in rstudio/rstudio. Currently, you have to view it in an external browser by clicking on "Open in Browser".
- Collapsible code chunk option in knitr that works in R Markdown does not work in bookdown. A workaround is to employ the answer in this StackOverFlow question or write your report in R Notebook instead. This feature may be added to
scrsreportin the next release.
Further Reading
Owner
- Name: SCRS
- Login: scrs-msu
- Kind: organization
- Website: http://www.montana.edu/statisticalconsulting/
- Repositories: 2
- Profile: https://github.com/scrs-msu
Citation (CITATION)
citHeader("This package is supposed for Montana State University Statistical Consulting and Research Services internal use only, so it is never intended to be cited. However, if you insist:")
citEntry(entry = "Manual",
title = "SCRS report bookdown templates",
author = c(
person("Greta","Linse", email="greta.linse@montana.edu", role = c("aut")),
person("Tan", "Tran", email = "tan.tran@montana.edu", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-9881-6339")),
person("Kenneth", "Flagg", role = "aut"),
person("Jordan", "Schupbach", role = "aut"),
person("Michael", "Lerch", role = "aut"),
person(family = "MSU SCRS", role = c("cph", "fnd"))
),
organization = "Statistical Consulting and Research Services at Montana State University",
address = "Montana, USA",
year = "2020",
url = "http://www.montana.edu/statisticalconsulting/",
textVersion = NULL
)
GitHub Events
Total
Last Year
Dependencies
- bookdown >= 0.12 imports
- xfun >= 0.8 imports