ff (version 2.2-14)

chunk.bit: Chunk bit vectors

Description

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

Usage

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

Arguments

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

See Also

chunk, bit

Examples

Run this code
# NOT RUN {
  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)

# }

Run the code above in your browser using DataCamp Workspace