identify_first_superchill: Identify when VALUE first crosses below a threshold

View source: R/identify_first_superchill.R

identify_first_superchillR Documentation

Identify when VALUE first crosses below a threshold

Description

Identify when VALUE first crosses below a threshold

Usage

identify_first_superchill(dat, ..., superchill_threshold = -0.7)

Arguments

dat

Data frame with at least three columns: TIMESTAMP (must be possible to convert to POSIXct), DEPTH, and VALUE. If column VARIABLE is included, it must have one unique entry. May also include columns with grouping variables passed to .... Other columns will be ignored.

...

Additional columns in dat to use as grouping variables. Results are automatically grouped by DEPTH.

superchill_threshold

The threshold for "superchill". Default is superchill_threshold = -0.7. The first observation below superchill_threshold triggers the end of the growing season for each group in DEPTH and ....

Details

Identifies TIMESTAMP when VALUE first crosses below a threshold for each group in DEPTH and ....

If the VALUE does not cross the threshold for any groups, a data frame with 0 rows will be returned.

Value

Returns a tibble with the TIMESTAMP for one minute before the first time VALUE goes below superchill_threshold (for each DEPTH and group in ...).

This TIMESTAMP is passed to identify_growing_seasons() to denote the end of the growing season.

No row will be returned for groups for which VALUE did not cross superchill_threshold.


dempsey-CMAR/tgc documentation built on Oct. 20, 2023, 6:45 p.m.