Lecture 7
NC State University
ST 295 - Spring 2025
2025-01-30
– Have you cloned the today’s AE repo?
– Are you keeping up with prepare material?
– Quiz-2 is graded! Quiz-3 comes out today at noon
– Homework-2 will be released early next week
Identify which dplyr
functions chooses rows or changes columns of an existing data set. Also, define what each function does.
– select()
– slice()
– arrange()
select()
chooses columns to subset
slice()
provides n
number of rows
arrange()
orders the rows of data frame
geom_bar
vs geom_col
“There are two types of bar charts: geom_bar() and geom_col(). geom_bar() makes the height of the bar proportional to the number of cases in each group (or if the weight aesthetic is supplied, the sum of the weights). If you want the heights of the bars to represent values in the data, use geom_col() instead.”