Exercise

Get a feel for the data

Before you analyze return data, it is a good idea to have (at least) a quick look at the data. R has a number of functions that help you do that:

  • The str() function compactly displays the structure of an R object. It is arguably one of the most useful R functions.
  • The head() and tail() functions shows you the first and the last part of an R object, respectively.
  • The class() function shows you the class of an R object.

Instructions

100 XP
  • Have a look at the structure of the sbux_df data.
  • Have a look at the first and the last part of the Starbucks prices.
  • What is the class of the Date column of the sbux_df data frame?