Session Ready
Exercise

Understanding your vectors

R has many functions to obtain more information about vectors. Two examples of these are:

  • table()
  • summary()

If you want to apply a function on an object, write the object between the parentheses of the function. The vectors country and period are already preloaded in the workspace, so you can use them right away.

Instructions
100 XP
  • Apply the table() function on the character vector period you created in the previous exercise.
  • Apply the summary() function on the numeric vector country and on the character vector period you created in the previous exercise.
  • Look at the output of the different functions on these vectors.