% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/oce.R
\name{oce.as.raw}
\alias{oce.as.raw}
\title{Version of as.raw() That Clips Data}
\usage{
oce.as.raw(x)
}
\arguments{
\item{x}{values to be converted to raw}
}
\value{
Raw values corresponding to \code{x}.
}
\description{
A version of as.raw() that clips data to prevent warnings
}
\details{
Negative values are clipped to 0, while values above 255 are clipped to 255;
the result is passed to \code{\link[=as.raw]{as.raw()}} and returned.
}
\examples{
x <- c(-0.1, 0, 1, 255, 255.1)
data.frame(x, oce.as.raw(x))
}
\author{
Dan Kelley
}
