Exploring Time Series Data in R

Premium

Let's look at a few commands that we will frequently use while exploring time series data.

length()

The length() function tells us the number of elements in out time series dataset.

1> length(msft_ts)
2[1] 252
3>
4

head()

The head() function displays the top n elements of the dataset. This is useful while exploring large datasets.

Unlock Premium Content

Upgrade your account to access the full article, downloads, and exercises.

You'll get access to:

  • Access complete tutorials and examples
  • Download source code and resources
  • Follow along with practical exercises
  • Get in-depth explanations