identifyBlocksVariable: Identifies data value groups within a 'data.frame' column.

Description Usage Arguments Value Examples

View source: R/identifyBlocksVariable.R

Description

identifyBlocksVariable identifies blocks of rows in the data slot of a Track object or data.frame object based on a grouping variable and a value for this variable. A block is defined as a set of directly subsequent rows with the same value for the specified variable.

Usage

1
identifyBlocksVariable(currenttrack, variable, value)

Arguments

currenttrack

A Track object (or data.frame object) with a boolean column gap in currenttrack@data. Data values have to be regularly spaced (may be achieved for example with reorganizeTracks).

variable

A character value indicating the name of a variable in currenttrack@data to group for.

value

A value of the currenttrack@data$variable for which to identify blocks of subsequent rows.

Value

A matrix with two columns and rows for each identified block. The first column indicates the row of currenttrack@data where the block begins and the second column indicates the row of currenttrack@data where the block ends or NULL if value does not exist for variable.

Examples

1
#

henningte/herdersTA documentation built on Jan. 22, 2020, 5:16 a.m.