status_periods: Define status assessment periods

View source: R/status_periods.R

status_periodsR Documentation

Define status assessment periods

Description

Divides the entire assessment period as defined by year_range into shorter intervals based on the number of periods and codes the datetime values according to which interval they belong to.

Usage

status_periods(
  datetime = NULL,
  periods = 5,
  year_range = NULL,
  bins_only = FALSE
)

Arguments

datetime

Vector of datetimes in POSIXct format.

periods

Number of shorter intervals to divide the total assesment period into. Default is 4.

year_range

Vector of the minimum and maximum years that define the total assessment period. If NULL, the year range provided in datetime is used.

bins_only

If TRUE, will return a vector of the each unique character values that define the calendar year range for each assessment period. Default is FALSE.

Value

Vector of character values that define the calendar year range for each assessment period

Examples

status_periods(datetime = data_assessed$sample_datetime, periods=4, year_range = c(start_year:end_year))


donco/odeqstatusandtrends documentation built on April 20, 2024, 12:46 a.m.