Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

getBitIndicators

Operate on bit fields


Description

The getBitIndicators function decompose a value into its respective bit components. The setBitIndicators combines individual components into a single number to "set" a bit field value.

Usage

getBitIndicators(val, defs)
setBitIndicators(vals, defs)

Arguments

val

the value to break up into the bit field components.

defs

the named integer vector that defines the bit field elements.

vals

the individual components that are to be combined into a single integer value representing the collection of components. These can be given as names or integer values that correspond to the elements in the defs, either by name or value.

Value

getBitIndicators returns a named integer vector representing the components of the bit field in the value. The names of the vector give the symbolic elements that were set in the value.

setBitIndicators returns a single integer value representing the value from combining the different components (e.g. ORing the bits of the different values).

Author(s)

Duncan Temple Lang

References

Curl homepage http://curl.haxx.se

See Also

The features field in curlVersion.

Examples

getBitIndicators(7, c(A = 1, B = 2, C = 4))
  getBitIndicators(3, c(A = 1, B = 2, C = 4))
  getBitIndicators(5, c(A = 1, B = 2, C = 4))

RCurl

General Network (HTTP/FTP/...) Client Interface for R

v1.98-1.3
BSD_3_clause + file LICENSE
Authors
CRAN Team [ctb, cre] (de facto maintainer since 2013), Duncan Temple Lang [aut] (<https://orcid.org/0000-0003-0159-1546>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.