monthlyQQplot: Quantile-quantile plot by month

View source: R/monthlyQQplot.R

monthlyQQplotR Documentation

Quantile-quantile plot by month

Description

Does QQ plots of monthly values of a single variable type in two data frames.

Usage

monthlyQQplot(
  primaryCRHM,
  primaryCol = 1,
  secondaryCRHM,
  secondaryCol = 1,
  samePeriod = TRUE,
  logfile = ""
)

Arguments

primaryCRHM

Required. The primary CRHMr data frame. Quantiles of this data will be plotted on the X axis.

primaryCol

Optional. The column in the primary data frame, not including the datetime. If not specified, defaults to the first column.

secondaryCRHM

Required. The secondary CRHMr data frame. Quantiles of this data will be plotted on the Y axis.

secondaryCol

Optional. The column in the secondary data frame, not including the datetime. If not specified, defaults to the first column.

samePeriod

Optional. Logical. Should the same period of time be used for both variables? Default is TRUE.

logfile

Optional. Name of the file to be used for logging the action. Normally not used.

Value

If successful, returns a ggplot2 object of faceted monthly QQ plots (3 rows x 4 columns) of the specified variables. If unsuccessful, returns an error.

Author(s)

Kevin Shook

See Also

monthlyPrecipTotals

Examples

BadLake <- BadLake7376
BadLake$year <- as.numeric(format(BadLake7376$datetime, format = "%Y"))
badlake73 <- subset(BadLake, year == 1973)
badlake75 <- subset(BadLake, year == 1975)
p <- monthlyQQplot(badlake73, 1, badlake75, 1, samePeriod = FALSE)
print(p)

CentreForHydrology/CRHMr documentation built on April 6, 2024, 5:27 p.m.