I am trying to create a line graph in R studio as above ^ however I am struggling. I would like the X axis to be dates from May 1997-Apr 1998, the y axis to be Sea Surface Temperatures, and the 2 lines to show the minimum and maximum sea surface temperatures.
My excel sheet is formatted as follows:
Date SST Min SST Max
The first step is to have the data in R rather than excel, are you able to do that ?
an easy way is to use excel to save as csv, then use R to read the csv
yes, define you aesthetics, x being your dates, and y being your first line. use geom line, then use a second geom line with y aesthetic set for the second line required.
I'm assuming you are familiar with aesthetics in ggplot2 ?
for a tutorial look at https://r4ds.had.co.nz/ chaper 3