Zooming Through Data

Lab 1D

Directions: Follow along with the slides and answer the questions in red font in your journal.

Data with Clarity

Splitting data sets

Altering the layout

layout = c(1,2)

Subsetting

The filter function

food_salty <- filter(____ , ____ == "Salty")

So what’s really going on?

food_salty <- filter(____ , ____ == "Salty")

3 parts of defining rules

More on ==

head(~salty_sweet == "Salty", data = food)

Saving values

food_salty <- filter(____ , ____ == "Salty")

Saving our subset

food_salty <- filter(____ , ____ == "Salty")

Including more filters

my_sub <- filter(food , salty_sweet == "Salty", cost <= 2)

Put it all together