Learn R Programming

EGRETci (version 1.0.0)

paVector: paVector

Description

Creates paVector. This is the index of which years are in the proper period of record.

Usage

paVector(year, paStart, paLong, vectorYear)

Arguments

year
integer year to look for. If the period of analysis is a water year (setPA(paStart = 10, paLong = 12)), the year corresponds to the calendar year of that water year for Jan-Sept. If the period of record crosses a calendar year (setPA(
paStart
integer starting month for period of analysis
paLong
integer length of period of analysis
vectorYear
numeric vector of decimal years

Value

  • surfaces matrix

Examples

Run this code
year <- 2000
paStart <- 10
paLong <- 12
vectorYear <- c(seq(1999,2001,0.1))
paIndexWaterYear <- paVector(year, paStart, paLong, vectorYear)
requestedYears <- vectorYear[paIndexWaterYear]
paStart <- 11
paLong <- 3
paIndexWinter <- paVector(year, paStart, paLong, vectorYear)
requestedWinterYears <- vectorYear[paIndexWinter]
paStart <- 6
paLong <- 3
paIndexSummer <- paVector(year, paStart, paLong, vectorYear)
requestedSummerYears <- vectorYear[paIndexSummer]
paStart <- 10
paLong <- 3
paIndexLate <- paVector(year, paStart, paLong, vectorYear)
endOfYear <- vectorYear[paIndexLate]

Run the code above in your browser using DataLab