Learn R Programming

phenex (version 1.4-5)

analyzeBits: Bit Analysis

Description

Analyses bits of a 16-bit integer

Usage

analyzeBits(value, mode=1, bitpos=0)

Arguments

value
A 16-bit integer value
mode
If mode is 0, the algorithm returns the bit on position ‘bitpos’. If mode is 1 (default), the algorithm returns the most significant bit, if mode is 2 it returns the second significant bit and if mode is 3 the return value is the integer value of the last four bits
bitpos
An integer value between 0 and 15 determining the position of the bit to read when mode is 0.

Value

An integer value respective to parameter ‘mode’.

Details

This routine analyses 16-bit integer values to get the indicators of MEDOKADS data

References

Koslowsky, D., Billing, H. and Friedrich, K. (2005): MEDOKADS: A long-term data set for detection and monitoring for desertification risks in the mediterranean. In RGLDD Conference.

Examples

Run this code
value <- -32768
res <- analyzeBits(value, mode=3)
res

Run the code above in your browser using DataLab