Multiple Choice Questions
Before completing the book’s Coder/Hacker chapter exercises, take this multiple-choice pre-test from the end of the chapter.
Next, visit the Coder and Hacker Chapter exercises page for more.
1: Which R data type is most appropriate for a categorical variable?
- Numeric
- Factor
- Integer
- Character
2: Which of the following opens the ggplot2 library?
- install.packages("ggplot2")
- library(package = "ggplot2")
- summary(object = ggplot2)
- open(x = ggplot2)
3: The block of text at the top of a code file that introduces the project is called
- library.
- summary.
- prolog.
- pane.
4: In a data frame containing information on the age and height of 100 people, the people are the _____________ and age and height are the _____________.
- observations, variables
- variables, observations
- data, factors
- factors, data
5: The results of running R code show in which pane?
- Source
- Environment
- History
- Console