msdDates {msdrought} | R Documentation |
Finding indices for Dates Relevant to the MSD Calculations
Description
This function pulls the indices associated with the dates that correspond with the Mid Summer Drought, as well as the indices that indicate first and last day of each year. This function is used in conjunction with the MSD function.
Usage
msdDates(x, peakwindow1, minwindow1, minwindow2, peakwindow2)
Arguments
x |
Date vector |
peakwindow1 |
desired date in MMDD format to begin search for early peak |
minwindow1 |
desired date in MMDD format to begin search for minimum |
minwindow2 |
desired date in MMDD format to end search for minimum |
peakwindow2 |
desired date in MMDD format to end search for late peak |
Value
Vector containing the indices corresponding to each year's beginning date, end date, and the critical MSD dates
Examples
x <- seq(from = as.Date("1981-01-01"), to = as.Date("1985-12-31"), by = "day")
output <- msdDates(x, peakwindow1 = "05-01", minwindow1 = "06-01",
minwindow2 = "08-31", peakwindow2 = "10-31")
[Package msdrought version 0.1.0 Index]