datesToDoY {sephora} | R Documentation |
Mapping phenodates to days of year (DoY)
Description
This function maps estimated phenological dates to days of a year.
Usage
datesToDoY(
start = 1,
end = 12,
phenodates,
totalDoY = c(0, cumsum(c(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)))
)
Arguments
start |
numeric, first month in mapping range. Default is 1. |
end |
numeric, last month in mapping range. Default is 12. |
phenodates |
numeric vector of length 6 containing estimates of phenological dates (green up, start of season, maturity, senescence, end of season and dormancy) |
totalDoY |
numeric vector, each entry (except for the first) gives a month's total number of days |
Details
Length of start:end
must be equal to length(totalDoY)-1
.
Value
A data.frame
with variables month
and day
Examples
x <- c(102,140,177,301,339,242)
names(x) <- c("GU", "SoS", "Mat", "Sen", "EoS", "Dor")
datesToDoY(phenodates = x)
[Package sephora version 0.1.31 Index]