View source: R/plotPrecipsByYear.R
plotPrecipsByYear | R Documentation |
Calculates cumulative precipitations and creates a ggplot2 faceted by year. Note that this function would work for any other cumulative variable, if the Y-axis label is changed.
plotPrecipsByYear(obs = "", obsNames = "", precipCols = 1, commonDates = 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 |
precipCols |
Optional. Column(s) containing precipitation. Can be a single value or a vector. Values will be recycled if necessary. Default is |
commonDates |
Optional. If |
If successful, returns a faceted ggplot2 object of cumulative precipitation vs time. If unsuccessful, returns FALSE
.
Kevin Shook.
plotTempsByYear
## Not run: l <- list(meas, WRF)
names <- c("Measured", "WRF")
p <- plotPrecipsByYear(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.