GetGroupFactor: GetGroupFactor.

Description Usage Arguments Value Examples

Description

GetGroupFactor will split a numeric vector according to a specified gap value. This is often a useful tool and therefore exported to the namespace.

Usage

1

Arguments

x

Numeric vector.

gap

Difference between two consecutive values at which a split is generated.

Value

A factor vector of length(x) indicating the diffferent groups in x.

Examples

1
2
3
x <- c(1:3,14:12,6:9)
GetGroupFactor(x=x, gap=2)
split(x, GetGroupFactor(x=x, gap=2))

InterpretMSSpectrum documentation built on May 2, 2019, 11:05 a.m.