mtbl_next: Iterate over mtbl file entries

Description Usage Arguments Details Examples

Description

Works with mtbl_map() and mtbl_get()

Usage

1
mtbl_next(x, n = 100L)

Arguments

x

an iterator started with mtbl_map() or mtbl_get()

n

number of records to return for this iteration. It's inefficient to sequentially iterate over large mtbl file but large values of n are also inefficent. 100 has been an optimal value in mtbl files used in Project Sonar. YMMV.

Details

If the number of available entries is less than n, a list of the actual number of remaining entries is returned. Otherwise a list of n entries is returned.

Examples

1
2
3
4
mtbl <- read_mtbl(system.file("extdata/sample.mtbl", package="mtblr"))
mp <- mtbl_map(mtbl)
(mtbl_next(mp))
mtbl_iter_close(mp)

brudis-r7/mtblr documentation built on May 13, 2019, 7:55 a.m.