Quiz

Take the interactive quiz

Directions

Now you try. For the workshop, we’ve prebuilt a data set that has information about menus in Duke’s Brodhead Center from three restaurants.

  1. From the File menu, open a New R Notebook: File > New File > R Notebook
  2. Reading the preloaded directions in your new script, add a code chunk at line 20. (Hint: Ctrl+Alt+I)
  3. Load the tidyverse package. In that code-chunk, type: library(tidyverse) and run the code chunk.
  4. Now you are ready to make new code chunks and follow the steps in Exercise 1 (below).

Exercise 1: Loading Data

  1. Using what we’ve you’ve seen in class, if data/brodheadCenter.csv is a csv file, how would you load the file into a new object called brodhead?

  2. What is the data structure of the brodhead?

  3. Take a look at the structure of the brodhead object.
    • How many observations (rows) are there?
    • How many variables (columns) are there?
    • How many of the variables are numeric data?

Answers

See the answers to the above section

 
R We Having Fun Yet‽ -- Learning Series
Data & Visualization Services
Duke University Libraries
C bn
Shareable via Creative Commons: CC By-NC