In the exercises below, we will work with Time Series analysis and see how R can make your life easier when working with Time Series.

This will be a series of Exercises and I urge you to take it in series.

Please install the package and load the library before starting.

Answers to these exercises are available here.

**Exercise 1**

Install the Forecast package. The first step in any analysis is to see the data and use the auto-plot to plot the gold data-set available in the forecast package.

**Exercise 2**

Find the outlier in the gold data. Find how far it is from the median.

**Exercise 3**

Use ggseasonalplot to plot the gas data. See how each year stacks with each other.

**Exercise 4**

Now I want to plot the gas data for the year 1990 and after. How do I achieve that?

**Exercise 5**

ggseasonalplot can be used to see seasonal plots as polar coordinates. Plot the same data as above, but use

polar coordinates instead.

**Exercise 6**

How can I see a monthly time series of the gas price?

Hint: use monthplot or ggsubseriesplot.

**Exercise 7**

For a time series, we can find the dominant frequency of that time series and use it for our analysis on how to

find the frequency of gas data (assume that it is a long /big data and you don’t have a clue about the frequency.)

**What's next:**

- Become a Top R Programmer Fast with our Individual Coaching Program
- Explore all our (>4000) R exercises
- Find an R course using our R Course Finder directory
- Subscribe to receive weekly updates and bonus sets by email
- Share with your friends and colleagues using the buttons below

Sanaaya Kurup says

Where is the data set for this exercise? I’m new to this website, sorry!

Biswarup Ghosh says

the dataset is from forecast package itself:)