range_split: Split object by ranges

Description Usage Arguments Examples

View source: R/ranges.R

Description

Split object by ranges

Usage

1
range_split(x, t, ranges)

Arguments

x

Vector or data frame to be split into groups.

t

Position vector to evaluate against ranges.

ranges

Ranges.

Examples

1
2
3
4
5
6
7
8
x <- 1:10
t <- as_time(1:10)
ranges <- t[1:3]
range_split(x, t, ranges)
ranges <- as_time(data.frame(1, 2:4))
range_split(x, t, ranges)
x <- data.frame(V1 = 1:10, V2 = 1:10)
range_split(x, t, ranges)

columbia-glacier/cgr documentation built on Aug. 20, 2017, 5:49 p.m.