Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
69 lines (38 sloc) 2.23 KB


Christopher Gandrud

This file explains how to use the bash shell script.


The simple script automatically creates a knitr beamer slideshow.

You define whether the slideshow should be called a Lecture or a Seminar. You also decide what number the file should have.

The script then creates a basic .Rnw knitr beamer slide show, complete with header, footer, and necessary style files.

I use this script to create lecture and seminar slide shows for an introductory applied stats class that I teach. For me, the numbers correspond to the week that the slideshow is for.


The Lecture Creator consists of a shell script file and a folder called CommonFiles. There are three files in the CommonFiles folder. These are the style files and the basic beamer slide show file. This folder also has a file called README.Rmd, used to create the explanation you are currently reading.

Set Up & Run

Before running the shell script on your Linux or Mac machine you must give it the correct permissions. Set your working directory (using the cd command) to the folder where is located. On my computer it is in /git_repositories/MakeProjects/Rnw_Lecture/

cd /git_repositories/MakeProjects/Rnw_Lecture/

Now change the permissions so that you can run the shell script:

chmod 755

Make sure the file has the correct permissions like this:

ls -l
-rwxr-xr-x@ 1 christophergandrud  admin  749 Sep 17 17:34

Everything looks fine.

To run the shell script type:


When you run the script you will be given two prompts:

Do you want to make a Lecture or Seminar?
Please enter the lecture number you want to compile.

Simply type in "Lecture" or "Seminar" depending on what you would like to create after the first prompt. Obviously type the number you want to give the slideshow after the second.