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

rawToUnsignedInt

Convert raw vector into a single unsigned integer value


Description

This function converts raw data into an unsigned integer

Usage

rawToUnsignedInt(raw_dat)

Arguments

raw_dat

A vector of class raw to be converted into an unsigned integer

Details

This function converts a vector of raw data into a single unsigned integer. for conversion of raw data into a vector of unsigned integers [0,255] use 'as.integer(x)'. For an inverse of this function see unsignedIntToRaw.

Value

A single unsigned integer value based on the provided raw data

Author(s)

Pepijn de Vries

See Also

Examples

## generate some raw data:
some.raw.data <- as.raw(c(0x01, 0x1e, 0x3f))

## convert raw data into an unsigned integer:
rawToUnsignedInt(some.raw.data)

## note the difference with
as.integer(some.raw.data)

ProTrackR

Manipulate and Play 'ProTracker' Modules

v0.3.7
GPL-3
Authors
Pepijn de Vries [aut, cre, dtc]
Initial release
2020-02-03

We don't support your browser anymore

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