Lab 1E
Directions: Follow along with the slides, completing
the questions in blue on your
computer, and answering the questions in red in your
journal.
Space, Click, Right Arrow or swipe left to move to
the next slide.
food
.height
gender
food
data and make some new multiple
variable plots you haven’t created before!sodium
on the y-axis and sugar
on the
x-axis.protein
also have more
calories
? Why do you think that?protein
and
calories
variables in your code? Does the relationship
between the variables change?protein
and
calories
change when the snack is either Salty
or Sweet
? Write down the code you used to answer this
question.groups
argument much like we did for bargraphs (use the
search feature in the History pane if you need
help).sodium
, sugar
, cost
,
salty_sweet
.dotPlot
or
histogram
of the calories
variable, but facet
the data using:How does the healthy_level
of a
Salty
or Sweet
snack impact the number of
calories
in the snack?
Although we are treating healthy_level
as a
categorical variable, R
recognizes it as a numerical
variable.
str
function.healthy_level
variable into a factor later on.Faceting your data on a numerical variable is NOT recommended.
ingredients
than less healthy snacks?ingredients
of a snack? Describe their
relationships.