R statistic program

profilegalaxy_8
EES619Exercise2.pdf

EES619 Introduction to Statistic using R Total Points: 100 Question 1 (43 points) Download the FluxData.csv file from Canvas The header of the file is: T soil = Soil temperature (oC) PAR: Photosynthetic Active Radiation (W/m2) Tair = Air temperature (oC) Vpd = Vapour Pressure Deficit (Pa) GPP = Gross Primary Production (gC/m2) SWC= Volumetric Soil Water Content (%)

a- (3) Open the file in R b- (10) In one window or plot, plot all the variables in the FluxData file with

exception of year, day of year, and month columns. c- (5) Add titles to the x and y axis for each of the plots with the appropriate unties

(For example: Temperature (oC)). Add a title (Name of the variable: Example: Soil Temperature) for each of the plot.

d- (10) Do a regression analysis between GPP and each of the environmental variables listed in the FluxData.csv file (i.e GPP vs. Stemp, GPP vs. PAR, GPP vs. AirTemp, etc.)

e- (10) Repeat steps b and c by plotting GPP vs Stemp, GPP vs. PAR, etc. f- (5) Add the R2 and p-value to each of the plots. Make sure to fix the y-axis tick

values orientation. Question 2 (57 points) Download the Murray_annual_precp.csv and Murray_annual_temp.csv file from Canvas

a- (3) Read the files in R b- (7) Calculate the precipitation mean per month for year 1981-2010 (i.e. January

mean for 1981-2010, etc.). c- (7) Calculate precipitation anomaly for each month (Himt: Subtract monthly data

from the long-term mean monthly data, e.g. January anomaly = January precipitation – January mean precipitation).

d- (6) Calculate the anomalies for these group of months: 1) December-Jan-Feb; 2) March-April-May; 3) June-July-August; and 4) September-October-November. (Hint: Add the monthly anomalies for Dec-Jan-Feb to calculate the anomaly for these 3 months, etc.)

e- (7) Create four barplot in one graph for part d. Make sure to include title for the month abbreviation for each barplot (DJF for Dec-Jan-Feb, etc.). Add Y labels

f- (7) Repeat step b using temperature data g- (7) Repeat step c using temperature data h- (6) Repeat step d using temperature data. Calculate mean temperature anomaly for

the months not the sum of temperature anomalies. i- (7) Repeat step e using the temperature data.