split_indices: Groups indices (1 to n) into groups of MAX size

Description Usage Arguments Value Examples

View source: R/misc.R

Description

Useful when needing to get data in groups of 200 as per http://graphical.weather.gov/xml/rest.php

Usage

1
split_indices(index, MAX = 200)

Arguments

index

numeric vector of indicies to split into vectors of MAX length

MAX

numeric, the maximum number of elements per group returned

Value

list of index vectors of length MAX or shorter

Examples

1
2
3
4
 ## Not run: 
     str(split_indices(201:615))
 
## End(Not run)

BigelowLab/ndfd documentation built on May 5, 2019, 2:43 p.m.