Stat 411/511

Lab 0

Sep 28/29

Welcome to lab

Generally, I will post a document here for you to work though at your own pace in lab. Today’s lab is a little different as your TA will lead you through an introduction to RStudio.

Open up RStudio. Before you start run this code (to install some packages you will need):

install.packages(c('ggplot2', 'Sleuth3', 'knitr'))

Your TA should touch on the following points:

  • Starting a new project, in a new folder called ST511
  • Writing code and running it directly in the “Console”
  • Opening a new R script
  • Editing and running code in the “Source Editor”
  • Saving an R script
  • Using the “History” pane to see all the commands you have run
  • Using the “Environment” pane to explore objects you have defined
  • Closing R Studio (Do you want to save your workspace? Answer NO!)
  • Compiling a Word document from an R Script using “Compile Notebook”

By the last point, you should be ready to complete Homework 0.

You can also read more about working with RStudio at:
RStudio Keyboard shortcuts

The files and folders you create on the lab computers are stored in your ONID homedrive. You can learn how to get to these files from other computers by following the instructions from the OSU helpdesk