knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.align = 'center', fig.width=6, fig.height=4 )
pkgs <- c("iheiddown", "magrittr", "ggplot2") lapply(pkgs, library, character.only = TRUE)
{iheiddown}
is not only a tool for students to write their thesis in. It can
also be of use for teaching activities at IHEID as it harbors a great looking
template for course syllabi. This short article will walk you through the
workflow of writing your very own syllabus in R.
The installation process is the same than for the thesis template. You'll need the following software:
{iheiddown}
by typing the following command
install.packages("iheiddown")
in the R-Studio console. Note: typing remotes::install_github("jhollway/iheiddown")
will provide you
with the latest version from GitHub.
Creating your first syllabus is easy! Let's look at how it is done. Before we begin, we have to create a new R project by clicking on the file tab in the top of the RStudio window and following the instructions of the prompt that appears. Now that we have created an R project for our presentation, we can open a new R-Markdown file. To do this click on the "plus file" logo in the top left corner and then on "R-Markdown".
knitr::include_graphics("images/syllabus/0-OpenProject.png", dpi = 144)
After you have done this, a little pop-up helper will appear. The first thing we
will do is to select the {iheiddown}
template for our presentation. To do so,
click on the "From Template" option on the left and select the
"Syllabus {iheiddown}" template. Now give your file a name and click
on "OK".
knitr::include_graphics("images/syllabus/1-CreateSyllabus.png", dpi = 144)
Congrats! You just created your first syllabus! We can actually already render
our syllabus. This is done by simply clicking the "knit button" while viewing
the MySyllabus.Rmd
pane. Et voilĂ ! You have now successfully generated your
first syllabus with R.
Take a moment to read through the generated syllabus to get acquainted with the
{R-markdown}
syntax and to get a feel of the possibilities of the
{iheiddown}
theme.
This section will focus on giving you an overview of the workflow of creating
your syllabus with the {iheiddown}
package.
The general options are set in the YAML header. You can define the contact information of the instructor and the teaching assistant as well as give a general course description or set evaluation policies.
You can also set bibliographic options such as the .bib
file you want to draw
your references from (references.bib
by default) and the style of the
bibliographic entries by altering the .csl
file.
The second step is to set the correct start date of your course in the main
MySyllabus.Rmd
file. This is done simply by editing the startdate
variable
in the first code chunk.
The third and last step is to edit the main body of the syllabus. To do this,
simply write the title of each week's session, a description if necessary and
add citations of the weeks material with the id of the reference in the bib file
preceded by "@" e.g. @Darwin1958
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.