| Line 54... |
Line 54... |
| 54 |
(\eqn{ = \max vec}{ = max(vec)}), is \code{N - 1} as for all other
|
54 |
(\eqn{ = \max vec}{ = max(vec)}), is \code{N - 1} as for all other
|
| 55 |
values in the last interval.
|
55 |
values in the last interval.
|
| 56 |
|
56 |
|
| 57 |
\code{left.open = TRUE} is occasionally useful, e.g., for survival data.
|
57 |
\code{left.open = TRUE} is occasionally useful, e.g., for survival data.
|
| 58 |
For (anti-)symmetry reasons, it is equivalent to using
|
58 |
For (anti-)symmetry reasons, it is equivalent to using
|
| 59 |
\dQuote{mirrored} data, i.e., the following is always true: \preformatted{
|
59 |
\dQuote{mirrored} data, i.e., the following is always true:
|
| - |
|
60 |
\preformatted{
|
| 60 |
identical(
|
61 |
identical(
|
| 61 |
findInterval( x, v, left.open= TRUE, ...) ,
|
62 |
findInterval( x, v, left.open= TRUE, ...) ,
|
| 62 |
N - findInterval(-x, -v[N:1], left.open=FALSE, ...) )
|
63 |
N - findInterval(-x, -v[N:1], left.open=FALSE, ...) )
|
| 63 |
}
|
64 |
}
|
| 64 |
where \code{N <- length(vec)} as above.
|
65 |
where \code{N <- length(vec)} as above.
|
| 65 |
}
|
66 |
}
|
| 66 |
\value{
|
67 |
\value{
|
| 67 |
vector of length \code{length(x)} with values in \code{0:N} (and
|
68 |
vector of length \code{length(x)} with values in \code{0:N} (and
|
| 68 |
\code{NA}) where \code{N <- length(vec)}, or values coerced to
|
69 |
\code{NA}) where \code{N <- length(vec)}, or values coerced to
|
| 69 |
\code{1:(N-1)} if and only if \code{all.inside = TRUE} (equivalently coercing all
|
70 |
\code{1:(N-1)} if and only if \code{all.inside = TRUE} (equivalently coercing all
|