View source: R/plotTempsByYear.R
plotTempsByYear | R Documentation |
Aggregates air temeratures to mean daily values and creates a ggplot2 faceted by year. Note that this function would work for any other non-cumulative variable, if the Y-axis label is changed.
plotTempsByYear(obs = "", obsNames = "", tempCols = 1, commonYears = TRUE)
obs |
Required. Either a CRHMr |
obsNames |
Optional. A vector containing names for the data frames. If there are more data frames than names, the data will be named |
tempCols |
Optional. Column(s) containing air temperatures. Can be a single value or a vector. Values will be recycled if necessary. Default is |
commonYears |
Optional. If |
If successful, returns a faceted ggplot2 object of mean daily air temperatures vs time. If unsuccessful, returns FALSE
.
Kevin Shook.
plotPrecipsByYear
## Not run: l <- list(meas, WRF)
names <- c("Measured", "WRF")
p <- plotTempsByYear(l, names)
library(ggplot2)
p <- p + scale_colour_manual(values=c("red", "blue")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.