-
Notifications
You must be signed in to change notification settings - Fork 110
/
Copy pathsqueeze.Rd
28 lines (26 loc) · 900 Bytes
/
squeeze.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/squeeze.R
\name{squeeze}
\alias{squeeze}
\title{Squeeze the imputed values to be within specified boundaries.}
\usage{
squeeze(x, bounds = c(min(x[r]), max(x[r])), r = rep.int(TRUE, length(x)))
}
\arguments{
\item{x}{A numerical vector with values}
\item{bounds}{A numerical vector of length 2 containing the lower and upper bounds.
By default, the bounds are to the minimum and maximum values in \code{x}.}
\item{r}{A logical vector of length \code{length(x)} that is used to select a
subset in \code{x} before calculating automatic bounds.}
}
\value{
A vector of length \code{length(x)}.
}
\description{
This function replaces any values in \code{x} that are lower than
\code{bounds[1]} by \code{bounds[1]}, and replaces any values higher
than \code{bounds[2]} by \code{bounds[2]}.
}
\author{
Stef van Buuren, 2011.
}