This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

library(dplyr)
## 
## Attaching package: 'dplyr'
## 
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## 
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(gdata)
## gdata: read.xls support for 'XLS' (Excel 97-2004) files ENABLED.
## 
## gdata: read.xls support for 'XLSX' (Excel 2007+) files ENABLED.
## 
## Attaching package: 'gdata'
## 
## The following objects are masked from 'package:dplyr':
## 
##     combine, first, last
## 
## The following object is masked from 'package:stats':
## 
##     nobs
## 
## The following object is masked from 'package:utils':
## 
##     object.size
setwd("c://Users//Adam/Desktop")
setwd("GYC602A")
dir()
##  [1] "~$Malin Head all.xlsx"                       
##  [2] "~$malinhead monthly.xlsx"                    
##  [3] "Ardara.csv"                                  
##  [4] "Armagh.csv"                                  
##  [5] "Athboy.csv"                                  
##  [6] "Belfast.csv"                                 
##  [7] "Birr.csv"                                    
##  [8] "Cappoquinn.csv"                              
##  [9] "Census2011_Admin_Counties_generalised20m.dbf"
## [10] "Census2011_Admin_Counties_generalised20m.shp"
## [11] "Census2011_Admin_Counties_generalised20m.shx"
## [12] "Combined"                                    
## [13] "Combined.csv"                                
## [14] "Cork Airport.csv"                            
## [15] "Derry.csv"                                   
## [16] "Drumsna.csv"                                 
## [17] "Dublin Airport.csv"                          
## [18] "Enniscorthy.csv"                             
## [19] "Foulkesmills.csv"                            
## [20] "IIP_National series.csv"                     
## [21] "IIP_station_metadata.pdf"                    
## [22] "Killarney.csv"                               
## [23] "Lab 4"                                       
## [24] "lab 4.1"                                     
## [25] "lab.r"                                       
## [26] "Malin Head all.xlsx"                         
## [27] "Malin Head maximum.xlsx"                     
## [28] "Malin Head Minimum.xlsx"                     
## [29] "Malin Head Rain.xlsx"                        
## [30] "Malin Head records.xlsx"                     
## [31] "malinhead monthly.xlsx"                      
## [32] "MalinHead.csv"                               
## [33] "Malinra.csv"                                 
## [34] "maps.RData"                                  
## [35] "Markree Castle.csv"                          
## [36] "mp Ardara.png"                               
## [37] "mp Armagh.png"                               
## [38] "mp Athboy.png"                               
## [39] "mp Belfast.png"                              
## [40] "mp Birr.png"                                 
## [41] "mp Cappoquinn.png"                           
## [42] "mp Cork Airport.png"                         
## [43] "mp Derry.png"                                
## [44] "mp Drumsna.png"                              
## [45] "mp Dublin Airport.png"                       
## [46] "mp Enniscorthy.png"                          
## [47] "mp Foulksmills.png"                          
## [48] "mp Killarney.png"                            
## [49] "mp Malin Head.png"                           
## [50] "mp Markree Castle.png"                       
## [51] "mp Mullingar.png"                            
## [52] "mp Phoenix Park.png"                         
## [53] "mp Portlaw.png"                              
## [54] "mp Rathdrum.png"                             
## [55] "mp Roches Point.png"                         
## [56] "mp Shannon Airport.png"                      
## [57] "mp Strokestown.png"                          
## [58] "mp University College Galway.png"            
## [59] "mp Valentia.png"                             
## [60] "mp Waterford.png"                            
## [61] "Mullingar.csv"                               
## [62] "NCEP_NEW.xls"                                
## [63] "NCEPVariables.1.csv"                         
## [64] "NCEPVariables.csv"                           
## [65] "NCEPVariables1.csv"                          
## [66] "Phoenix Park.csv"                            
## [67] "Portlaw.csv"                                 
## [68] "precipitation R studio ncep files.R"         
## [69] "presentation for class.Rmd"                  
## [70] "Presentation.Rmd"                            
## [71] "presentation_for_class.html"                 
## [72] "presentation_for_class.Rmd"                  
## [73] "rainfall.RData"                              
## [74] "Rainfallanalysislecture2.docx"               
## [75] "Rainfallanalysislecture2.Rmd"                
## [76] "Rathdrum.csv"                                
## [77] "readme.txt"                                  
## [78] "Roches Point.csv"                            
## [79] "Roster files.txt"                            
## [80] "rsconnect"                                   
## [81] "Shannon Airport.csv"                         
## [82] "Strokestown.csv"                             
## [83] "test.html"                                   
## [84] "test.png"                                    
## [85] "Time Series graphing.R"                      
## [86] "tips.docx"                                   
## [87] "try again.Rmd"                               
## [88] "try_again.html"                              
## [89] "University College Galway.csv"               
## [90] "Valentia.csv"                                
## [91] "Waterford.csv"
Malin_Head <-read.xls("Malin Head records.xlsx")
library(dygraphs)
Malin_Head$Maximum %>% 
  ts(start=c(1961),freq=1) -> max_ts
max_ts %>% window(c(1961),c(2000))
## Time Series:
## Start = 1961 
## End = 2000 
## Frequency = 1 
##  [1] 12.18603 11.58740 11.33014 11.96749 11.47342 11.67479 11.88959
##  [8] 12.00683 11.78904 11.69753 12.45151 11.40492 11.98438 11.82082
## [15] 12.19151 12.08607 11.73205 11.69507 11.08521 11.85000 11.55726
## [22] 12.03425 12.14110 11.91475 11.45699 11.08575 11.73616 12.28907
## [29] 12.45671 12.42877 11.86137 11.86940 11.52301 11.97671 12.67041
## [36] 11.99590 12.90192 12.38219 12.42301 12.06230
max_ts %>% dygraph(xlab = "Year", ylab = "Temperature C", main = "Maximum Temperature for Malin Head station")

Malin_Head$Minimum %>% 
  ts(start=c(1961),freq=1) -> min_ts
min_ts %>% window(c(1961),c(2000))
## Time Series:
## Start = 1961 
## End = 2000 
## Frequency = 1 
##  [1] 7.084384 6.546575 6.431507 7.068033 6.692055 7.118356 7.116712
##  [8] 6.776503 6.790685 7.143562 7.688767 6.570765 7.076712 7.001918
## [15] 7.352877 7.292623 6.839452 7.166849 6.235068 7.154098 6.788219
## [22] 6.852329 7.412329 6.983607 6.683836 6.477534 6.967397 7.512022
## [29] 7.443562 7.718356 7.426575 7.348634 7.180000 7.306027 7.536164
## [36] 7.088798 7.880000 7.841918 7.802466 7.540710
min_ts %>% dygraph(xlab = "Year", ylab = "Temperature C", main = "Minimum Temperature for Malin Head station")

Malin_Head$Precipitation %>% 
  ts(start=c(1961),freq=1) -> prec_ts
prec_ts %>% window(c(1961),c(2000))
## Time Series:
## Start = 1961 
## End = 2000 
## Frequency = 1 
##  [1] 1083.2  991.3  978.8  997.8 1034.3 1028.8 1241.3  973.9 1052.9 1128.8
## [11]  989.2  966.9 1037.7  986.3  863.6  982.6 1028.1 1093.1 1139.6 1084.6
## [21] 1182.5 1162.7  923.4 1018.4 1176.0 1165.9  953.3 1163.9 1080.6 1308.8
## [31] 1077.8 1275.4 1071.5 1189.1 1176.3  924.9 1000.1 1287.5 1339.3 1175.9
prec_ts %>% dygraph(xlab = "Year", ylab = "Precipitation mm", main = "Precipitation for Malin Head station")

setwd("c://Users//Adam/Desktop")
setwd("GYC602A")
dir()
##  [1] "~$Malin Head all.xlsx"                       
##  [2] "~$malinhead monthly.xlsx"                    
##  [3] "Ardara.csv"                                  
##  [4] "Armagh.csv"                                  
##  [5] "Athboy.csv"                                  
##  [6] "Belfast.csv"                                 
##  [7] "Birr.csv"                                    
##  [8] "Cappoquinn.csv"                              
##  [9] "Census2011_Admin_Counties_generalised20m.dbf"
## [10] "Census2011_Admin_Counties_generalised20m.shp"
## [11] "Census2011_Admin_Counties_generalised20m.shx"
## [12] "Combined"                                    
## [13] "Combined.csv"                                
## [14] "Cork Airport.csv"                            
## [15] "Derry.csv"                                   
## [16] "Drumsna.csv"                                 
## [17] "Dublin Airport.csv"                          
## [18] "Enniscorthy.csv"                             
## [19] "Foulkesmills.csv"                            
## [20] "IIP_National series.csv"                     
## [21] "IIP_station_metadata.pdf"                    
## [22] "Killarney.csv"                               
## [23] "Lab 4"                                       
## [24] "lab 4.1"                                     
## [25] "lab.r"                                       
## [26] "Malin Head all.xlsx"                         
## [27] "Malin Head maximum.xlsx"                     
## [28] "Malin Head Minimum.xlsx"                     
## [29] "Malin Head Rain.xlsx"                        
## [30] "Malin Head records.xlsx"                     
## [31] "malinhead monthly.xlsx"                      
## [32] "MalinHead.csv"                               
## [33] "Malinra.csv"                                 
## [34] "maps.RData"                                  
## [35] "Markree Castle.csv"                          
## [36] "mp Ardara.png"                               
## [37] "mp Armagh.png"                               
## [38] "mp Athboy.png"                               
## [39] "mp Belfast.png"                              
## [40] "mp Birr.png"                                 
## [41] "mp Cappoquinn.png"                           
## [42] "mp Cork Airport.png"                         
## [43] "mp Derry.png"                                
## [44] "mp Drumsna.png"                              
## [45] "mp Dublin Airport.png"                       
## [46] "mp Enniscorthy.png"                          
## [47] "mp Foulksmills.png"                          
## [48] "mp Killarney.png"                            
## [49] "mp Malin Head.png"                           
## [50] "mp Markree Castle.png"                       
## [51] "mp Mullingar.png"                            
## [52] "mp Phoenix Park.png"                         
## [53] "mp Portlaw.png"                              
## [54] "mp Rathdrum.png"                             
## [55] "mp Roches Point.png"                         
## [56] "mp Shannon Airport.png"                      
## [57] "mp Strokestown.png"                          
## [58] "mp University College Galway.png"            
## [59] "mp Valentia.png"                             
## [60] "mp Waterford.png"                            
## [61] "Mullingar.csv"                               
## [62] "NCEP_NEW.xls"                                
## [63] "NCEPVariables.1.csv"                         
## [64] "NCEPVariables.csv"                           
## [65] "NCEPVariables1.csv"                          
## [66] "Phoenix Park.csv"                            
## [67] "Portlaw.csv"                                 
## [68] "precipitation R studio ncep files.R"         
## [69] "presentation for class.Rmd"                  
## [70] "Presentation.Rmd"                            
## [71] "presentation_for_class.html"                 
## [72] "presentation_for_class.Rmd"                  
## [73] "rainfall.RData"                              
## [74] "Rainfallanalysislecture2.docx"               
## [75] "Rainfallanalysislecture2.Rmd"                
## [76] "Rathdrum.csv"                                
## [77] "readme.txt"                                  
## [78] "Roches Point.csv"                            
## [79] "Roster files.txt"                            
## [80] "rsconnect"                                   
## [81] "Shannon Airport.csv"                         
## [82] "Strokestown.csv"                             
## [83] "test.html"                                   
## [84] "test.png"                                    
## [85] "Time Series graphing.R"                      
## [86] "tips.docx"                                   
## [87] "try again.Rmd"                               
## [88] "try_again.html"                              
## [89] "University College Galway.csv"               
## [90] "Valentia.csv"                                
## [91] "Waterford.csv"
Malin_Head <-read.xls("Malin Head all.xlsx")


Malin_Head$max545 %>% ts(freq=12,start=1961) -> max_ts # Time serioes object
max_ts %>% window(c(1961,1),c(2000,12)) 
##       Jan  Feb  Mar  Apr  May  Jun  Jul  Aug  Sep  Oct  Nov  Dec
## 1961  7.8  6.7  7.6  7.8  7.1  6.9  8.3  7.1  6.6  6.0  9.8 10.6
## 1962  8.3  6.7  4.8  5.4  8.3  9.4  5.8  7.9  7.1  6.7  5.6  4.4
## 1963  4.0 12.1 12.7  9.9  9.9  7.9  6.3  8.1  6.0  7.3 10.3 10.9
## 1964  7.9 10.6 11.6 10.4  9.5  9.5 11.7 11.7 11.7 10.8 10.2 11.3
## 1965 11.1 11.0 10.7  8.4  8.9  9.8  9.6  7.8 12.7  9.4  9.1 10.7
## 1966 10.1 10.4 10.6 15.4 12.1 13.9 17.2 13.9  9.9 12.8 10.6 11.9
## 1967 11.7 13.7 14.3  8.4  8.1  8.9  9.7  9.5 10.0 11.1 11.8 12.9
## 1968  8.9  8.6 11.1 10.4  9.8 10.5  7.1  6.8  6.3  5.6  7.7  8.8
## 1969  9.3 10.2 13.3 12.6 13.2 13.2 12.6 12.6 11.7 15.4 10.0 15.2
## 1970 11.2 11.7 15.0 12.2 10.0 12.2 10.4 11.2 13.0 10.9 14.3 14.0
## 1971 15.7 11.9 13.9 11.7 13.8 13.1 12.6 11.7 12.6 13.8 16.5 14.7
## 1972 14.6 13.4 13.4 11.6 12.3 13.7 12.3 12.7 12.9 12.0 14.7 13.3
## 1973 11.1 10.6 10.6 12.3 11.4 10.4 12.2 14.6 15.2 15.7 19.0 15.2
## 1974 14.8 14.8 12.7 13.9 13.4 14.3 14.0 16.2 18.7 16.0 16.7 13.5
## 1975 15.0 14.4 15.6 17.4 14.7 16.0 18.2 14.3 14.1 14.4 16.7 18.9
## 1976 18.7 15.1 16.7 14.3 14.5 14.7 16.5 15.6 14.9 14.9 15.7 15.6
## 1977 16.1 14.9 14.6 15.3 13.7 16.9 14.8 14.3 14.9 14.4 14.9 15.3
## 1978 16.4 18.5 14.0 14.4 15.3 16.7 16.1 17.2 16.1 15.4 16.1 16.9
## 1979 15.9 15.3 17.2 14.8 16.9 15.6 15.2 14.9 15.0 14.6 14.9 14.7
## 1980 17.1 14.5 15.1 16.8 14.6 16.0 16.1 16.7 17.6 17.4 17.9 23.4
## 1981 21.9 17.6 19.7 18.6 16.5 16.4 16.3 13.3 13.8 14.4 15.9 19.2
## 1982 18.9 15.4 18.9 16.1 17.9 16.9 18.7 16.1 18.2 19.7 15.7 16.2
## 1983 17.3 17.9 14.6 14.6 14.2 14.2 13.1 14.9 13.9 15.4 15.9 14.4
## 1984 14.6 14.8 15.7 14.0 13.7 14.3 13.8 13.1 15.3 18.4 13.8 14.1
## 1985 12.1 11.1 11.5 10.4 10.3 11.2 12.0 11.6 10.3 10.8 10.8 11.6
## 1986 10.8 10.4 11.6 12.3 12.8 11.1  8.8 11.6 11.7  9.3 10.2  8.7
## 1987  8.5  9.4  9.5 10.6 10.9  9.7  9.7 10.8 10.8  9.4  9.2  9.9
## 1988  9.3  9.8  9.0  8.0  6.8  7.8  8.9  8.3  7.9  7.7  6.7  5.8
## 1989  4.9  8.3  5.6  5.3  3.9  9.2 10.2 11.8 10.9 11.2 12.8 11.7
## 1990 11.8 12.1  8.7  8.9  4.9  5.3  6.6  7.3  4.2  3.0  5.1  4.1
## 1991  3.7  5.2  2.7  2.9  5.3  5.4  6.7  5.9  7.4  8.8 10.0  8.8
## 1992  9.1  5.6  9.3  7.1  6.9  7.5  6.9 10.3  7.7  7.8  6.3  7.9
## 1993  7.7  7.0  6.5  9.4  9.6 10.5  7.9  8.1  8.4 10.2 10.6 10.7
## 1994  7.8  9.3  9.5  9.6 10.1 10.8  8.4  9.0 10.4  8.4 10.8  7.1
## 1995  5.3  8.9 10.0  7.8  8.8  8.9 10.7 12.1 11.9  6.8  5.9  6.3
## 1996  5.6  4.5  4.4  4.3  6.6  4.9  3.9  4.3  6.2  6.7  4.7  6.8
## 1997  9.2  6.9  5.2  5.8  5.0  4.7  4.3  7.1  8.6  6.6  9.0  8.8
## 1998  7.3  8.0  7.3  6.9 10.3  9.3  7.7  7.8  6.0  5.6  6.1  7.9
## 1999  8.9  7.8  8.8  7.9  9.4 10.3  8.9  9.1 10.0  9.3  9.2  7.8
## 2000  8.3  7.3  7.9 10.4  9.9  9.4 12.7 12.1 14.3 15.9 13.2 18.0
max_ts %>% window(c(1961,1),c(2000,12)) %>%
  monthplot(col='dodgerblue',col.base='indianred',lwd.base=3, main = "maximum temperature for Malin Head station", xlab = "Months", ylab = "Temperature C")

Malin_Head$min545 %>% ts(freq=12,start=1961) -> min_ts # Time serioes object
min_ts %>% window(c(1961,1),c(2000,12)) 
##       Jan  Feb  Mar  Apr  May  Jun  Jul  Aug  Sep  Oct  Nov  Dec
## 1961  2.4  3.9  0.4  5.2  1.4  3.6 -0.3  1.2  4.0  4.4 -0.7 -0.3
## 1962  4.9  2.1  0.6  0.0  1.7  1.9  3.1  0.1  2.4  3.0  2.9  2.5
## 1963  2.2  1.4  2.3  3.8  1.1  4.0  2.3  3.6  1.8  1.6  1.6  2.8
## 1964  3.6  3.6  4.8  5.0  6.2  6.0  5.1  7.9  8.4  4.5  5.4  6.8
## 1965  7.6  7.4  7.5  5.4  4.4  4.6  4.2  2.1  3.6  3.0  4.0  6.2
## 1966  5.8  6.0  7.3  6.8  7.5  7.1  8.5  6.8  7.9  4.6  7.9  8.9
## 1967  9.1  7.0  6.8  5.7  4.2  2.8  3.3  6.2  6.9  6.7  7.7  7.9
## 1968  6.2  4.2  5.1  8.2  7.0  6.3  5.7  4.3  1.3  0.1  1.2  3.8
## 1969  5.7  1.8  6.9  9.5  6.9  7.0  6.9  5.6  6.8  5.6  5.9  6.3
## 1970  8.2  5.4  8.0  8.6  7.5  6.1  4.8  8.2  7.9  5.1  5.7  8.5
## 1971  7.4  7.1  7.3  7.6  8.4  7.9  7.1  7.3  8.6  4.2  7.4  7.4
## 1972  9.1 10.3  7.4  7.2  6.5  5.3  7.9  9.6  9.4  9.6  9.3  9.9
## 1973  7.3  6.6  5.9  6.6  8.5  9.1  7.9  8.6 10.2 11.6  9.4  9.6
## 1974  9.3  9.0  8.8  8.5  7.2  9.5  9.9  8.5 10.2 11.2 10.9 11.3
## 1975 10.2  9.9 10.4  9.7 10.9 11.6 12.7 12.8  9.9 10.2 11.2  9.9
## 1976 12.7 11.8  6.8 10.9 11.3 10.7  9.7 12.7 12.0 10.2 10.8  9.6
## 1977 11.6 11.3  8.2 12.1 10.9 10.8 11.7 11.6 10.8 10.8 11.2 11.8
## 1978 11.8 11.9 12.3 11.2 11.5 10.5 13.7 10.5 10.0 10.7 10.4 10.8
## 1979 10.3 10.3  7.2 10.9 10.3 11.8 11.9  6.4 11.7 11.8 11.7 11.8
## 1980 12.0 11.7 12.4 11.1 12.6 12.2 10.9  9.9 10.8 11.1 11.6 14.6
## 1981 16.8 10.9 10.8 11.3 14.3 13.1 13.7 11.2  9.7 10.6 10.2  8.5
## 1982  9.3 10.5 10.0 10.3  8.7 12.2 11.2 11.1  9.1 11.9 10.2  9.6
## 1983 10.2 13.1  8.5 10.2 12.1  7.6  8.7  7.6  6.3  8.7 10.8 12.8
## 1984  5.7 10.9  9.9 10.2  7.5  6.9  9.9  7.7  6.9  9.2 11.2 10.1
## 1985  8.5  8.9  5.8  8.2  7.8  6.2  7.1  6.7  6.6  4.3  5.8  6.1
## 1986  7.9  6.8  6.2  7.1  8.2  8.4  5.1  4.1  7.1  6.7  7.0  3.4
## 1987  2.6  2.3  1.5  8.1  9.0  4.8  5.3  5.7  8.0  7.4  6.5  6.7
## 1988  3.7  4.0  3.9  5.7  3.1  1.4  1.6  0.3  3.6  3.8  4.7  2.9
## 1989  0.5  1.6  0.8 -2.2 -0.9 -0.9  3.3  7.3  8.8  6.4  6.9  3.4
## 1990  3.1  9.5  6.1  3.1  1.6  0.4 -0.5  2.6  3.8  1.4 -3.3  2.3
## 1991 -3.1 -2.0 -0.9 -1.1 -3.1  1.1 -0.9  1.2  0.6  1.2  1.6  2.3
## 1992  5.2  2.8  2.1  1.8  2.3  2.4  3.5  2.3  1.3  1.6  2.8  2.3
## 1993  3.9  3.5  2.7  2.1  3.5  7.2  5.7  0.8  0.9  4.7  7.1  7.6
## 1994  2.2  4.7  4.5  2.4  2.4  4.7  5.2  4.8  5.6  6.7  3.3  4.4
## 1995  2.2  0.8  1.9  4.6  5.1  6.7  5.9  5.4  5.0  1.8  1.0 -1.0
## 1996  1.0  2.2  2.2  2.1  1.6  2.2 -0.4  1.3 -0.7 -2.7 -0.4  0.8
## 1997  1.2  6.0  3.8  2.3  0.7 -1.7 -0.3  0.8  4.1 -1.0  1.6  4.5
## 1998  0.9  3.9  4.4  3.6  3.6  5.1  4.3  0.1  1.2  1.8  0.6  0.0
## 1999  2.4  3.9  0.8  1.1  2.1  3.4  1.9  3.9  5.2  6.8  3.6  5.3
## 2000  2.5  1.5  3.9  4.8  5.7  6.7  6.2  5.2  2.2  6.1  7.1  5.7
min_ts %>% window(c(1961,1),c(2000,12)) %>%
  monthplot(col='dodgerblue',col.base='indianred',lwd.base=3, main = "Minimum temperature for Malin Head station", xlab = "Months", ylab = "Temperature C")

Malin_Head$RAIN545 %>% ts(freq=12,start=1961) -> prec_ts
prec_ts %>% window(c(1961,1),c(2000,12)) 
##       Jan  Feb  Mar  Apr  May  Jun  Jul  Aug  Sep  Oct  Nov  Dec
## 1961 10.9  3.0  0.1  1.7  3.9  0.0  5.3  7.6  0.0  0.0  6.5  8.4
## 1962  0.7  0.0  0.0  0.0  0.2 10.9  0.0  0.9  3.1  0.0  0.0  0.0
## 1963  0.1  7.6  2.3 11.2  7.5  8.1  1.5  3.2  1.6 11.2 14.8  9.0
## 1964  3.3  6.5  2.6  2.2  6.5  4.6  2.2  0.5  4.6  0.0  0.0  1.9
## 1965  0.0  0.0  0.0  0.0  0.0  4.6  5.7  5.5 14.4  1.4  5.6 10.3
## 1966  0.0  0.0  0.0  0.0  0.4  0.0  0.0  0.2  0.5  2.0  3.7  0.1
## 1967  0.0  0.0  1.4  4.3  0.7  2.1  0.2  1.3  0.3  0.7  0.0  3.4
## 1968  0.0  0.0 13.9 14.1  0.2  2.9  4.1  0.0  0.3 15.7  9.3  0.0
## 1969  0.0  7.2  0.0  0.6  0.5 19.1  3.4  0.1  0.0  0.9  0.0  2.6
## 1970  1.2  2.5  3.3 18.2  9.0  2.2 14.5  0.0  0.0  0.0  7.5  1.1
## 1971  9.2  6.3  6.5  0.0  1.2  3.4  7.4  3.9  0.0  0.0  0.0  0.0
## 1972  1.6  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.4  0.0  0.2
## 1973  0.0  2.7  3.1  0.2  0.0  0.0  0.0  0.0  1.3  0.0  0.6  4.9
## 1974  0.9  5.5  3.7  0.1  0.0  0.0  0.0  0.0  7.6  0.0  1.7  5.1
## 1975  0.7  1.0  0.0  4.6  0.0  0.0  4.1  4.9  0.6  0.5  0.0  0.7
## 1976  2.0  0.0  1.2  4.7  0.0  0.8  6.5  2.9  0.0  0.1  0.0 27.3
## 1977  9.9  2.0  0.0  0.4  0.4  0.0  0.0  0.2  0.1  0.0  0.0  0.0
## 1978  4.9  4.5  2.8  0.7  0.5  0.0  2.8  0.0  2.1  6.5 37.1  1.1
## 1979  7.8  0.7  0.0  1.5  0.3  0.3  0.0  8.6  0.6  5.6  4.7  0.1
## 1980  8.3  4.6  2.5 11.4  5.6  0.7  0.4 13.0  1.0  4.5  0.6  0.0
## 1981  1.6  0.0  0.0  0.8  0.0  0.0  1.9  2.6  0.7  0.0  0.0  0.7
## 1982  8.7  4.2  3.7  3.4  0.5 13.9  2.9  0.0  0.1  1.4  2.1  0.0
## 1983  0.0  1.8  2.3  8.7 15.8  5.8  5.0  5.0  0.2  0.2  0.5  5.2
## 1984  4.6  0.0  0.1  3.0  2.5  2.6  5.9  2.5  0.0  0.0  0.1  1.3
## 1985 21.8  1.8  0.1  0.1  2.2  0.9 17.9  9.5  4.1  0.9  0.0  3.7
## 1986  2.1  1.3  6.0  0.9  6.4  4.2  0.8  1.3  2.4  2.8  2.3  3.7
## 1987  5.9  0.2  0.0  0.0  0.0  0.0  0.2  1.0  0.0  0.0  0.0  0.0
## 1988  0.7  9.9  9.1  5.0 10.9  0.3  0.2 10.6 12.2  2.1  7.1  2.4
## 1989 10.5 12.5  1.8  1.4  2.3 12.1  7.7  8.7  3.9  7.6  2.5  0.0
## 1990  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
## 1991  7.0  3.0  1.1  4.8  0.7  0.0  0.0  0.0  0.5 10.1  4.4  0.2
## 1992  9.0  5.2  7.4 11.6  5.8  6.0  1.0 14.3  3.2  6.9  7.0  3.1
## 1993  1.6  4.9  6.1 12.1  1.2  2.6  0.0  0.0  0.0  0.0 10.7  9.5
## 1994  1.4  1.9  3.8  5.1  7.8  4.1  3.6  0.7  2.2  1.8 21.1  3.2
## 1995  2.1  1.8  2.6  1.0  0.4  0.0  0.0  0.0  0.0  0.0  0.0  0.0
## 1996  0.1  0.0  0.1  0.0  2.9  4.8  0.0  0.0  0.3  0.0  4.0  3.9
## 1997  0.0  0.1  0.0  0.2  2.8  0.0  3.4  0.0  0.0  0.0  0.0  0.0
## 1998  1.7  0.5  0.0  4.5  6.5  2.0  0.0 19.7  7.7  6.8  8.2 11.3
## 1999 11.1  3.2  5.5  3.2 15.6  2.5  2.1  3.1  0.8  0.3  0.0  0.0
## 2000  0.0  0.0  0.1  0.0  0.9  0.8  0.9  0.0  0.0  1.4  0.0  1.4
prec_ts %>% window(c(1961,1),c(2000,12)) %>%
  monthplot(col='dodgerblue',col.base='indianred',lwd.base=3, main = "Precipitation for Malin Head station", xlab = "Months", ylab = "Precipitation mm")

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.