The R Project SVN R

Rev

Rev 60981 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 60981 Rev 60983
Line 24... Line 24...
24
    value should be included in the first (or last) bin.}
24
    value should be included in the first (or last) bin.}
25
}
25
}
26
\details{
26
\details{
27
  This is a \sQuote{barebones} version of \code{cut.default(labels =
27
  This is a \sQuote{barebones} version of \code{cut.default(labels =
28
    FALSE)} intended for use in other functions which have checked the
28
    FALSE)} intended for use in other functions which have checked the
-
 
29
  arguments passed.  (Note the different order of the arguments they have
29
  arguments passed.
30
  in common.)
30
 
31
 
31
  Unlike \code{\link{cut}}, the \code{breaks} do not need to be unique.
32
  Unlike \code{\link{cut}}, the \code{breaks} do not need to be unique.
32
  An input can only fall into a zero-length interval if it is closed
33
  An input can only fall into a zero-length interval if it is closed
33
  at both ends, so only if \code{include.lowest = TRUE} and it is the
34
  at both ends, so only if \code{include.lowest = TRUE} and it is the
34
  first (or last for \code{right = FALSE}) interval.
35
  first (or last for \code{right = FALSE}) interval.
Line 40... Line 41...
40
  \code{NA} codes, as are values outside range of \code{breaks}.
41
  \code{NA} codes, as are values outside range of \code{breaks}.
41
}
42
}
42
\seealso{
43
\seealso{
43
  \code{\link{cut}}, \code{\link{tabulate}}
44
  \code{\link{cut}}, \code{\link{tabulate}}
44
}
45
}
-
 
46
\examples{
-
 
47
## An example with non-unique breaks:
-
 
48
x <- c(0, 0.01, 0.5, 0.99, 1)
-
 
49
b <- c(0, 0, 1, 1)
-
 
50
.bincode(x, b, TRUE)
-
 
51
.bincode(x, b, FALSE)
-
 
52
.bincode(x, b, TRUE, TRUE)
-
 
53
.bincode(x, b, FALSE, TRUE)
-
 
54
}
-
 
55
 
45
\keyword{category}
56
\keyword{category}