rawToSignedInt {ProTrackR} | R Documentation |
Convert a raw vector into signed integers (short)
Description
This function converts a vector of raw
data into signed integer values.
Usage
rawToSignedInt(raw_dat)
Arguments
raw_dat |
A vector of |
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()
.
Value
A vector of the same length as raw_dat
, holding signed integer values.
Author(s)
Pepijn de Vries
See Also
Other raw.operations:
as.raw()
,
nybbleToSignedInt()
,
nybble()
,
rawToCharNull()
,
rawToPTModule()
,
rawToUnsignedInt()
,
signedIntToNybble()
,
signedIntToRaw()
,
unsignedIntToRaw()
Other integer.operations:
nybbleToSignedInt()
,
nybble()
,
rawToUnsignedInt()
,
signedIntToNybble()
,
signedIntToRaw()
,
unsignedIntToRaw()
,
waveform()
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)
[Package ProTrackR version 0.4.3 Index]