Creating a Time Series Object in R

Premium

In R, we can use the ts() function to create a time series object.

Usage

Below is a simplified format of the ts function. For complete details use ?ts in your R console.

1ts(data = NA, start = 1, end = numeric(), frequency = 1,  deltat = 1, names = )
2

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