This GitHub repo provides a template you can use to organize your work for Psy6136: Categorical Data Analysis (or any course). It provides:
- A reasonable organization of folders for your work. Feel free to add any others
my6136
├── assign
├── data
├── images
├── notes
├── R
└── tutorials
-
Some templates for using Rmarkdown in assignments or projects and also for setting up R scripts so you “compile” them with knitr to produce output in HTML, DOCX, PDF, … The following are provided, just to get you started:
- Assignment template: Simple template for
using an R script for an assignment. This appears like this in
HTML when you
knitrit. - Rmarkdown template: For a report, with more text than code. Code is in R “chunks”
- R script template: For an R script, with output rendered to HTML, DOCX, or PDF
- Assignment template: Simple template for
using an R script for an assignment. This appears like this in
HTML when you
I recommend that you set up an RStudio project for your work in the course, where you can organize your notes and work on assignments, projects, etc.
This repository on GitHub: my6136
provides a template for this. You can simply download the ZIP
file
to your computer, unzip it, and then open it in RStudio (double-click on
the file my6136.Rproj).
If you are comfortable using GitHub, you can simply fork & clone this
repo to your own account. Details on this are given in fork and clone
this repo. The
images below show what’s involved for my6136.
If you don’t yet use GitHub, you can easily create a GitHub account (highly recommended: Your future self will thank me!)
You will need a bunch of R packages for this course. The file
R/install-vcd-packages.R contains the ones
I recommend. Simply run this in RStudio.
In RStudio, rendering scripts and .Rmd files to PDF uses
pandoc to convert to LaTeX .tex files and
then working LaTeX installation to convert to PDF. The R package
tinytex makes this relatively easy.
For more details on using Git and Github for working with R, see:
- Jenny Bryan’s Getting Started with GitHub
- How to use Git and GitHub with R



