get_last_date: Get the last date from a phenology record

Description Usage Arguments Value Author(s) Examples

View source: R/get_last_date.R

Description

When looking at multi-year phenology records, it is normally obvious in which year bloom occurred last. Determining this with an automated procedure, however, is a bit tricky, when the range of phenological dates spans across a calendar year transition. This function finds the latest phenological date of the record. This is the date before the longest phenological date gap.

Usage

1
get_last_date(dates, first = FALSE)

Arguments

dates

numeric vector of Julian dates (days of the year)

first

boolean variable that can be set to TRUE to get the first, not the last, date of the phenology record.

Value

the latest (earliest) date of the series, under the assumption that the longest period without bloom can be interpreted as separating the phenological seasons. This should be a reasonable assumption in most cases.

Author(s)

Eike Luedeling

Examples

1
2
3
4
5
get_last_date(c(1,3,6,8,10,25))
get_last_date(c(345,356,360,365,2,5,7,10))
get_last_date(c(345,356,360,365,2,5,7,10),first=TRUE)

 

chillR documentation built on May 30, 2017, 6:57 a.m.

Search within the chillR package
Search all R packages, documentation and source code