This package provides functions for creating Rmarkdown templates to write and manage the Master of Science in Analytics Capstone Project. Templates are formatted according to the current and general requirements of the program.
Currently, the PDF and gitbook versions are fully-functional. The word and epub versions are in development, have no templates behind them, and are essentially calls to the default functions in the bookdown
package this depends on.
If you are new to working with bookdown
and rmarkdown
, please read over the documentation available in phoenixdown PDF template (which you can create by following the simple instructions below) and the bookdown book.
Under the hood, a custom LaTeX template is used to ensure that documents conform to submission standards. At the same time, composition and formatting can be done using lightweight markdown syntax, and R code and its output can be seamlessly included using rmarkdown.
Using phoenixdown has some prerequisites, such as Pandoc, LaTeX and some fonts. To compile PDF documents using R, you need to have Pandoc, LaTeX and several related packages installed. If you have a recent version of RStudio, then you already have Pandoc and don't need to do anything more about that.
Next is LaTeX. An easy way to install LaTeX on any platform is with the tinytex
package:
install.packages(c('tinytex', 'rmarkdown'))
tinytex::install_tinytex()
# after restarting RStudio, confirm that you have LaTeX with
tinytex:::is_tinytex()
To use phoenixdown from RStudio:
-
Ensure that you are using the latest version of RStudio. You can use phoenixdown without RStudio. For example, you can write the Rmd files in your favorite text editor (e.g. Atom, Notepad++).
-
Install the bookdown and phoenixdown packages:
if (!require("devtools")) install.packages("devtools", repos = "http://cran.rstudio.org")
devtools::install_github("rstudio/bookdown")
devtools::install_github("JustinMShea/phoenixdown")
- Use the New R Markdown dialog to select MScA Capstone Project. Here are the steps, and a screenshot below:
File -> New File -> R Markdown... then choose 'From template', then choose 'MScA Capstone Project.
VERY IMPORTANT: You must enter index
as the Name. Your project will only Knit if you name the directory index
at this step. You can name the final .pdf whatever you like later.
Or run this line in your R console to create a new Capstone Project from the template:
rmarkdown::draft(file='index.Rmd', template = "capstone", package = 'phoenixdown', create_dir = TRUE)
You need to edit the individual chapter R Markdown files to write your thesis.
You can write in the Rmd files without RStudio (in fact RStudio lacks some conveniences for writing, such as live spell-checking and live word count). One may prefer to do some writing and editing of your Rmd files in their favorite text editor. Atom, Notepad++ and Emacs are popular choices, ultimately returning to R or RStudio to work on code.
To render your thesis into a PDF, open index.Rmd
in RStudio and then click the "knit" button. To change the output formats between PDF, gitbook and Word , look at the output:
field in index.Rmd
and comment-out the formats you don't want.
Alternatively, if you're not using RStudio, you can use this from the R console, assuming your have set the 'index/
directory as your working directory:
bookdown::render_book('index.Rmd', phoenixdown::capstone_pdf())
The PDF file of your thesis will be deposited in the _book/
directory.
The following components are ones you should edit to customize your thesis:
This is the main configuration file for your thesis. It determines what Rmd files are included in the output, and in what order. Arrange the order of your chapters in this file and ensure that the names match the names in your folders.
This file contains all the meta information that goes at the beginning of your document. You'll need to edit this to put your name on the first page, the title of your thesis, etc.
These are the Rmd files for each section of your capstone, so write each section in these. If you're writing in RStudio, you may find the wordcount addin useful for getting word counts and readability statistics in R markdown documents. You might also enjoy writing in these Rmd files with Atom, Notepad++, Sublime Text, and Emacs.
Store your bibliography (as bibtex files) here. We recommend using the citr addin and Zotero to efficiently manage and insert citations.
Specific style files for bibliographies should be stored here. The default APA style required for the Capstone is already here.
Store your figures and data here and reference them in your R Markdown files. See the bookdown book for details on cross-referencing items using R Markdown.
This project was forked and modifies the code and ideas in the following:
If you would like to contribute to this project, please start by reading our Guide to Contributing. Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.