My First Quatro Document

Author

Maxwell Martin

My first report

A first example of generating a report using R, Rstudio and Quarto. The goal of this report is to:

  • Generate a simple report
  • Include some R code
  • Include a figure generated by R
5 + 6
[1] 11

This code will read in the file so we can use data from it.

giss = read.csv("giss_temp.csv")
summary(giss)
      Year          Month          DecDate        TempAnom        
 Min.   :1881   Min.   : 1.00   Min.   :1881   Min.   :-0.860000  
 1st Qu.:1913   1st Qu.: 3.75   1st Qu.:1914   1st Qu.:-0.210000  
 Median :1946   Median : 6.50   Median :1946   Median :-0.050000  
 Mean   :1946   Mean   : 6.50   Mean   :1946   Mean   :-0.009428  
 3rd Qu.:1979   3rd Qu.: 9.25   3rd Qu.:1979   3rd Qu.: 0.150000  
 Max.   :2011   Max.   :12.00   Max.   :2012   Max.   : 0.880000  

We should now be able to access the data stored in this file, and calculate the means and standard deviations of different cagtegories.

annualTemp = tapply(giss$TempAnom, giss$Year, mean)
years = unique(giss$Year)

This the code used to calculate temperature deviation per year

hist(giss$TempAnom, breals = 20)
Warning in plot.window(xlim, ylim, "", ...): "breals" is not a graphical
parameter
Warning in title(main = main, sub = sub, xlab = xlab, ylab = ylab, ...):
"breals" is not a graphical parameter
Warning in axis(1, ...): "breals" is not a graphical parameter
Warning in axis(2, at = yt, ...): "breals" is not a graphical parameter

plot(years, annualTemp, type = "l", lwd = 2, col = 2, xlab = "Years", ylab = "Temp Anom")
abline(h = 0, lty = 2)

This line plot shows Temnperature Anomolies per year

plot(years, annualTemp, type = "l", lwd = 2, col = 2, xlab = "Years", ylab = "Temp Anom")
abline(h = 0, lty = 2)

This is the code used to create the line plot shown above.