library(fpp2)
library(ggplot2)

Using the help function to explore what the series gold, woolyrnq and gas represent.

  1. Using autoplot() to plot each of these in separate plots.

    autoplot(gold)

    autoplot(woolyrnq)

    autoplot(gas)

  2. Finding the frequency of each series by applying the frequency() function.

    frequency(gold)
    ## [1] 1
    frequency(woolyrnq)
    ## [1] 4
    frequency(gas)
    ## [1] 12
  3. Using which.max() to spot the outlier in the gold series and showing which observation it was.

    which.max(gold)
    ## [1] 770
    gold[which.max(gold)]
    ## [1] 593.7