wellHydrograph: Plots hydrograph of daily well depths

View source: R/wellHydrograph.R

wellHydrographR Documentation

Plots hydrograph of daily well depths

Description

Creates a ggplot2 object of hydrograph of well depths.

Usage

wellHydrograph(
  wellObs,
  depthCol = 1,
  fakeDates = FALSE,
  hydroYear = TRUE,
  startMonth = 10,
  quiet = TRUE
)

Arguments

wellObs

Required. CRHMr obs data frame of daily depths.

depthCol

Optional. Column containing depths. Default is 1.

fakeDates

Optional. If set to TRUE then all dates have their year replaced with 2000, and the actual year is added as a variable in the plotted data. This allows the plot to be faceted by year, as shown in the examples.

hydroYear

Optional. If TRUE, the depths are plotted against the hydrological year.

startMonth

Optional. Sets the first month of the hydrological year (if required).

quiet

Optional. Suppresses display of messages, except for errors. If you are calling this function in an R script, you will usually leave quiet=TRUE (i.e. the default). If you are working interactively, you will probably want to set quiet=FALSE.

Value

If successful, returns a ggplot2 object. If unsuccessful, returns FALSE.

Author(s)

Kevin Shook

Examples

## Not run: 
p <- wellHydrograph(well, fakeDates = FALSE)
#' # re-plot with fake dates
p <- wellHydrograph(well, fakeDates = TRUE, hydroYear = TRUE)
p <- p + ggplot2::facet_wrap(~year)
p <- p + ggplot2::scale_x_date(date_breaks = "3 months",
date_labels = "%b")

## End(Not run)

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