Learn R Programming

lfstat (version 0.9.4)

hyear_start: Extract or guess the Start of a Hydrological Year

Description

Retrieve the start of a hydrological year either from the attributes or from the column 'hyear' of an object of class lfobj.

Usage

hyear_start(x, abbreviate = FALSE)
"hyear_start"(x, abbreviate = FALSE)
"hyear_start"(x, abbreviate = FALSE)
hyear_start(x) <- value "hyear_start"(x) <- value "hyear_start"(x) <- value

Arguments

x
object of which the start of the hydrological year should be determined.
abbreviate
logical. Should the names be abbreviated?
value
numeric vector of length one. Month in which the hydrological year starts.

Value

a vector of length one, either of type character (abbreviate = TRUE) or numeric.

Details

If a valid start of an hydrological year is found in the attributes, it is returned. Otherwise if a column hyear exists, it is used. If this is note possible the integer number one is returned (for January) and a warning is issued.

See Also

water_year

Examples

Run this code
data(ngaruroro)
hyear_start(ngaruroro)

data(ray)
hyear_start(ray, abbreviate = TRUE)

Run the code above in your browser using DataLab