The very first thing to do is to install (and upload) the package “forecast”.

#install.packages("forecast") 
library(forecast) 

The data “AirPassengers” is the classic Box & Jenkins airline data and represents the monthly totals of international airline passangers from 1949 to 1960.

par(mfrow=c(2,2))
plot(AirPassengers)
plot(diff(AirPassengers),ylab="Diff 1",main=expression(y[t]-y[t-1]))
plot(diff(AirPassengers,12),ylab="Diff 12",main=expression(y[t]-y[t-12]))
plot(diff(diff(AirPassengers,1),12),ylab="Diff 1,12",main=expression(y[t]-y[t-1]-y[t-12]+y[t-13]))

Let also