Preparation

Folder structure for this course

By this point, you probably have created a folder for this course somewhere on your computer. In our example, we assume this folder is located here: C:/Users/yourname/semester2/Modul_CMA (mentally replace this with your actual path). Before we dive into the exercises, take a minute to think about how you are going to structure your files in this folder. This course will take place over 6 weeks, and in each week you will receive or produce various files. We recommend creating a separate folder for each week, and one folder for the semester project, like so:

Course Folder (C:\Users\yourname\semester2\Modul_CMA)
 ¦--week_1                                                
 ¦--week_2                                                
 ¦--week_3                                                
 ¦--week_4                                                
 ¦--week_5                                                
 ¦--week_6                                                
 °--semester_project 

For the R-exercises that take place in weeks 1 to 6, we recommend that you create a new RStudio Project each week in subdirectory of the appropriate week. For example, this week your folder structure could look like this:

Folder Week 1 (C:\Users\yourname\semester2\Modul_CMA\week_1)
 ¦--slides.pdf                                                  
 ¦--my_notes.docx                                               
 ¦--seminar_screenshot.jpg                                      
 °--cma-week1-rexercise                                             
     ¦--cma-week1-rexercise.Rproj                                   
     ¦--wildschwein_BE.csv                                      
     °--my_solution.qmd   

Note:

  • the RStudio Project is located in a subfolder of C:/Users/yourname/semester1/Modul_CMA/week_1 and named cma-week1-rexercise.
  • cma-week1-rexercise is the project’s directory name and the project name
  • we realize that cma and the week number is redundant, there is a reason1 for this
  • this means each week is a fresh start (which has pros and cons)

Create an RStudio project

Create a new RStudio Project (File > New Project > New Directory > New Project).

  1. Click on “Browse” and switch to your equivalent of the folder C:/Users/yourname/semester1/Modul_CMA/week_1 (the project we are about to initiate will be be created in a subdirectory of this folder). Click on “open” to confirm the selection
  2. In the field “Directory name”, type cma-week1-rexercise. This will be the name of your RStudio project and it’s parent directory.
  3. Click on “Create Project”

You are all set! You can start working on the tasks of exercise 1.


  1. You will see the project names of all your RStudio Projects listed in RStudio. Having the week number in the project name keeps you from getting confused on which project you are working on.↩︎