consecutive_group: Function to add a new column indicating group ID based on...

View source: R/utilities.R

consecutive_groupR Documentation

Function to add a new column indicating group ID based on sequential data

Description

Function to add a new column indicating group ID based on sequential data

Usage

consecutive_group(vec)

Arguments

vec

the vector

Value

a vector where the ID depends on whether the value of x is sequential. For example, indicate whether a series of years is sequential, or if there are say three groups of sequential years. Break up the data by groups with consecutive values


pbs-assess/herringutils documentation built on Jan. 10, 2025, 8:43 a.m.