Title

This is an R Markdown workflow template created by Jacq. It’s intended to be copy+pasted into a new Notebook file, as a way to maintain consistency and habits across projects.

Almost all of the information here (and much more) can be found in some form in the R Markdown Definitive Guide by Yihui Xie, J. J. Allaire, and Garrett Grolemund, and that link should be your first stop as you edit this templateto suit your own needs. Think of this as a combination “Project Template” and “Beginner’s Guide to Customizing R Notebooks.”

It assumes you have the following things:

  1. Rstudio
  2. Optionally;
    • The rmdformats package installed, for theme/colour information
    • The redsquare.png and greencheck.png image files.
  3. Super optionally;
    • The viridis, and shades packages, for ggplot theming.
  4. A familiarity with code chunks and other functions of r/rmarkdown.

This template reflects a workflow/organizational structure that works for me (Jacq), at a specific point in time (August 2019). Different people and projects will have different needs, and you should manipulate this document so it works for you. In the word of the Frizz – Take chances! Make Mistakes! Break R! Get messy!


YAML Header Explanation

(psst did you know that YAML stands for “YAML Ain’t Markup Language”?)

Output1: Top-level theming

This calls the theme information (the colour scheme and overall layout of the page). rmdformats::readthedown: is telling the document to use the readthedown theme from the rmdformats package. R has loads of themes and you should find one that works for you.

highlight refers to the syntax highlighting. There are lots! I like tango, but kate is good as well. There’s a list here.

code_folding refers to how code is displayed. When code_folding is set to hide, the code isn’t displayed on the page (it’s hidden), but can be revealed by pressing the “Code” button. When it’s set to show (as it is here), the code is displayed by default, but the button to hide the code is available. When this line isn’t included, code is shown but there’s no option to hide it.

You can also add your own theming via a custom .css file, but you’ll have to remember to include it in every folder you have Notebooks in.

Specific Outputs

These values function the same way as the global ones above, but are specific to different kinds of output documents.

df_print refers to the way dataframes are displayed. paged means they’s displayed as a paged table (rather than a hugely long/wide one). There are LOTS of options here for displaying data, as well as options to manipulate the way data is displayed in each chunk, but this is a good default.

toc refers to the Table of Contents (the clickable list on the left-hand side of the page). toc_float controls whether the contents stays visible after the user scrolls down.


Load Libraries & ggplot Theme

This are just example packages.

Using a custom theme for ggplot isn’t super necessary, but it’s fun!


Action plan

This is for scoping the work and adding a list of long-term tasks.

  • The First Thing
    • Green checkboxes are for completed tasks
    • Red Squares are for uncompleted tasks
      • You can have subtasks too
      • Many subtasks
        • Pretty much infinite levels of subtasks
  • A second thing
    • wow
      • amazing
      • spectacular
  • A third thing
  • Tasks can be added easily as you continue working on the project and think of new things to do.

Dailies

These are for keeping track of what you’ve done today. This is good for self-esteem! Tabs keep track of weeks.

Week 2

  • Monday
    • Thing I did
  • Tuesday
    • Another thing I did
    • A thing I started but didn’t finish
  • Day 3

Week 1

  • Day 1
    • Made a thing
  • Day 2
    • cleaned up data
    • did some other stuf
  • Day 3
    • Was in meetings all day :(
  • Day 4
    • You don’t need to keep track of red days if they make you sad
  • Day 5
    • Did this other thing

Journal

This can work in conjunction with, or replace Dailies. It allows you to use prose to outline your goals for the day, identify problems, or otherwise keep track of your day-to-day work in detail.

July 31

Check-in

Here’s some stuff about how other things happened and some rambley thoughts about the project that I might end up cleaning up later for a conference or paper.

Check Out

A bit more rambling. In a few weeks I’ll come back to this entry and remember this train of thought, and find it inspiring!


July 30

Check-in

I want to focus on X today (around A task and the B meeting). I’ll settle for just getting subset-of-X finished, but I’ll be happy if I can manage more than that.


Some issue came up and I needed to email someone else for troubleshooting. I’ll work on this other thing instead.

Check Out

Actually, they emailed me back more quickly than I anticipated, and I was able to finish what I set out to do! hooray!


July 29

Check-in

The goal today is to do task 1 and 2, and start on 3

Check Out

It’s nearly 6 o clock and it took me hours to read the csv file in :( (This one is a real entry)


Data Loading / Cleaning


Analysis 1


Analysis 2 - Put better descriptive titles here


Visualizations

Pie Charts for Kevin

lmers for Jen

Flow Charts for Jacq

Author

Date