Skip to contents

Create bitmask buffers

Usage

as_narrow_bitmask(x, ...)

# S3 method for default
as_narrow_bitmask(x, ...)

# S3 method for narrow_bitmask
as_narrow_bitmask(x, ...)

# S3 method for logical
as_narrow_bitmask(x, ...)

new_arrow_bitmask(buffer = raw())

# S3 method for narrow_bitmask
as.logical(x, ..., start = 1, end = NULL)

Arguments

x

An object to convert to a bitmask

...

Passed to S3 methods

buffer

A raw() vector containing the bitmask data

start, end

Start and end indices (inclusive) to limit when converting to logical().

Value

An object with class 'narrow_bitmask'

Examples

as_narrow_bitmask(c(TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE))
#> <narrow_arrow_bitmask[8]>
#> [1]  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
as.logical(new_arrow_bitmask(0x01))
#> [1]  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE