Skip to contents

This function converts a vector of raw data into signed integer values.

Usage

rawToSignedInt(raw_dat)

Arguments

raw_dat

A vector of raw data.

Value

A vector of the same length as raw_dat, holding signed integer values.

Details

This function converts a vector of raw data into signed integer values [-128,127]. To convert unsigned integers into raw data use as.raw(). For the inverse of this function see signedIntToRaw().

Author

Pepijn de Vries

Examples

## generate some raw data:
some.raw.data <- as.raw(c(0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x90))

## convert the raw data into a vector of signed intgers:
rawToSignedInt(some.raw.data)
#> [1]  104  101  108  108  111 -112