chunk.bit: Chunk bit vectors

Description Usage Arguments Value Author(s) See Also Examples

Description

chunking method for ffdf objects automatically considering RAM requirements from recordsize as calculated from sum(.rambytes[vmode])

Usage

1
2
## S3 method for class 'bit'
chunk(x, RECORDBYTES = .rambytes["logical"], BATCHBYTES = getOption("ffbatchbytes"), ...)

Arguments

x

bit

RECORDBYTES

optional integer scalar representing the bytes needed to process a single element of the bit vector

BATCHBYTES

integer scalar limiting the number of bytes to be processed in one chunk, default from getOption("ffbatchbytes"), see also .rambytes

...

further arguments passed to chunk

Value

A list with ri indexes each representing one chunk

Author(s)

Jens Oehlschlägel

See Also

chunk, bit

Examples

1
2
3
4
5
6
7
  n <- 1000
  x <- bit(n)
  ceiling(n / (300 %/% sum(.rambytes["logical"])))
  chunk(x, BATCHBYTES=300)
  ceiling((n/2) / (100 %/% sum(.rambytes["logical"])))
  chunk(x, from=1, to = n/2, BATCHBYTES=100)
  rm(x, n)

OHDSI/ff documentation built on May 7, 2019, 8:30 p.m.