Let's refresh
This is an exercise to refresh some of the things you learned in the previous exercise.
Remember how you select the data of a specific variable in your data frame? Or how R can act as a fancy calculator? You can prove it here!
This exercise is part of the course
Data Analysis and Statistical Inference
Exercise instructions
- Take a look at the height and genhlth variables of the
cdc
data frame. Use thehead()
functions to avoid flooding your console! - Assign the sum of
84941
and19686
to the objectsum
. - Assign the multiplication of
73
and51
to the objectmult
.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# The cdc data frame is already loaded into the workspace.
# View the head or tail of both the height and the genhlth variables:
# Assign your sum here:
sum <-
# Assign your multiplication here:
mult <-