0

I am dealing with some micro-climate data, where temperature was measured at 3 hour intervals over the course of 11 days.

I am hoping to generate a scatter plot of this data in R Studio, but am battling as I am quite new to the program.

I would like to plot the "time of day" along the x axis and temperature along the y axis, with each set of temperature measurements for each day as a separate series ("Temp day 1," "Temp day 2," "Temp day 3" ... "Temp day 11") on the plot with each series represented with uniquely coloured/symbolized data points.

My data column headings look like this in excel and I have imported it into R studio in this layout.

Time of Day | Temperature day 1 | Temperature day 2 | Temperature day 3 ... Temperature day 11

Once I have plotted this scatter plot in R Studio, is it them possible to fit trend lines to the data points at the 90th, 50th and 10th quantiles? If so would I be able to get the the slope values for these trend lines for comparision?

Any help with the appropriate codes to run, in order to perform these tasks would be greatly appreciated.

Many Thanks

  • 3
    I think ggplot2 and reshape2 will be your friends here, but that nobody can help you unless you provide a [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). And show some of the code you're struggling with. – Heroka Aug 14 '15 at 08:53
  • And please clarify some more about the trend lines you mention. Are the percentiles per timepoint? Per day? For the entire sample? – Heroka Aug 14 '15 at 09:03
  • Hi, ok thank you so much. I am hoping to get the percentile trend lines for the entire sample if that is possible? So I would hopefully end up with the scatterplot, with three trend lines (90th, 50th and 10th quantiles). – Stephanie Martin Aug 14 '15 at 09:11
  • So that's three horizontal lines in the plot? (And please provide the example). – Heroka Aug 14 '15 at 09:14

0 Answers0