Learn R Programming

bitfield (version 1.0.0)

bf_flag: Build a flag

Description

Convert a flag specification into actual flag values

Usage

bf_flag(registry, flag = NULL)

Value

vector of the flag values.

Arguments

registry

registry(1)
an already defined bitfield registry.

flag

character(1)
name of the flag to build.

Details

This function extracts the flag specification, including its test to call it on the data from which the flag shall be created.

Examples

Run this code
reg <- bf_registry(name = "testBF", description = "test bitfield",
                   template = bf_tbl)
reg <- bf_map(protocol = "na", data = bf_tbl, registry = reg,
              x = year)
str(reg@flags)

bf_flag(registry = reg, flag = "na_year")

Run the code above in your browser using DataLab