analyzeBits {phenex}R Documentation

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.

Details

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

Value

An integer value respective to parameter ‘mode’.

Author(s)

Daniel Doktor, Maximilian Lange

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

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

[Package phenex version 1.4-5 Index]