R code used to create AMO index (fig. 3)

Set working directory

setwd("G:/Thesis data")
getwd()
## [1] "G:/Thesis data"

Load data

AMO_ts <- read.csv("AMO Timseries- 1856-2017.csv")

Trim the data - 1856-2014

AMO_ts_trim <- AMO_ts[1:159, ]

Convert data from monthly means to annual means

First remove year column

Years <- AMO_ts_trim$YEAR

And the monthly data

Months <- AMO_ts_trim[2:13]

AMO_ts_anmean <- rowMeans(Months,na.rm = FALSE)

Now join to Years again

AMO_ts_anmean <- data.frame(Years, AMO_ts_anmean)

Visualisation of AMO over 158 year time series

plot(AMO_ts_anmean, type='l',xlab='Year',ylab=expression(paste('AMO (',degree~C,')')),
     main='AMO timeseries 1856-2014')