as_narrow_bitmask: Create bitmask buffers

View source: R/bitmask.R

as_narrow_bitmaskR Documentation

Create bitmask buffers

Description

Create bitmask buffers

Usage

as_narrow_bitmask(x, ...)

## Default S3 method:
as_narrow_bitmask(x, ...)

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

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

new_arrow_bitmask(buffer = raw())

## S3 method for class '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))
as.logical(new_arrow_bitmask(0x01))


paleolimbot/arrowvctrs documentation built on Oct. 12, 2023, 7 a.m.