getMeanPreci: Get mean rainfall data.

View source: R/getMeanPreci.R

getMeanPreciR Documentation

Get mean rainfall data.

Description

Get mean rainfall data, e.g. mean annual rainfall, mean monthly rainfall and mean winter rainfall.

Usage

getMeanPreci(
  inputTS,
  method = NULL,
  yearIndex = NULL,
  monthIndex = NULL,
  fullResults = FALSE,
  omitNA = TRUE,
  plot = FALSE,
  ...
)

Arguments

inputTS

A time series with only data column (1 column).

method

A string showing the method used to calculate mean value, e.g., "annual". more information please refer to details.

yearIndex

A NUMERIC ARRAY showing the year index of the time series.

monthIndex

A NUMERIC ARRAY showing the month index of the time series.

fullResults

A boolean showing whether the full results are shown, default is FALSE. If FALSE, only mean value will be returned, if TRUE, the sequence of values will be returned.

omitNA

A boolean showing in the calculation, whether NA is omitted, default is FALSE.

plot

A boolean showing whether the results will be plotted.

...,

title, x, y showing the title and x and y axis of the plot, shoud be a string.

Details

There are following methods to be selected, "annual": annual rainfall of each year is plotted. "winter", "spring", "autumn", "summer": seasonal rainfall of each year is plotted. Month(number 1 to 12): month rainfall of each year is plotted, e.g. march rainfall of each year. "meanMonthly": the mean monthly rainfall of each month over the whole period.

Since "winter" is a crossing year, 12, 1, 2, 12 is in former year, and 1, 2 are in latter year. so winter belongs to the latter year.

Value

The mean value of the input time series or the full results before calculating mean.


hyfo documentation built on Aug. 16, 2023, 5:08 p.m.