oce.as.raw: Version of as.raw() That Clips Data

View source: R/oce.R

oce.as.rawR Documentation

Version of as.raw() That Clips Data

Description

A version of as.raw() that clips data to prevent warnings

Usage

oce.as.raw(x)

Arguments

x

values to be converted to raw

Details

Negative values are clipped to 0, while values above 255 are clipped to 255; the result is passed to as.raw() and returned.

Value

Raw values corresponding to x.

Author(s)

Dan Kelley

Examples

x <- c(-0.1, 0, 1, 255, 255.1)
data.frame(x, oce.as.raw(x))

oce documentation built on Sept. 11, 2024, 7:09 p.m.