Get startedGet started for free

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

View Course

Exercise instructions

  • Take a look at the height and genhlth variables of the cdc data frame. Use the head() functions to avoid flooding your console!
  • Assign the sum of 84941 and 19686 to the object sum.
  • Assign the multiplication of 73 and 51 to the object mult.

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 <-
Edit and Run Code