The R Project SVN R

Rev

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

Rev 60323 Rev 61433
Line 5... Line 5...
5
 
5
 
6
\name{tabulate}
6
\name{tabulate}
7
\title{Tabulation for Vectors}
7
\title{Tabulation for Vectors}
8
\description{
8
\description{
9
  \code{tabulate} takes the integer-valued vector \code{bin} and counts
9
  \code{tabulate} takes the integer-valued vector \code{bin} and counts
10
  the number of times each integer occurs in it. 
10
  the number of times each integer occurs in it.
11
}
11
}
12
\usage{
12
\usage{
13
tabulate(bin, nbins = max(1, bin, na.rm = TRUE))
13
tabulate(bin, nbins = max(1, bin, na.rm = TRUE))
14
}
14
}
15
\alias{tabulate}
15
\alias{tabulate}
Line 18... Line 18...
18
      \link{Long vectors} are supported.}
18
      \link{Long vectors} are supported.}
19
    \item{nbins}{the number of bins to be used.}
19
    \item{nbins}{the number of bins to be used.}
20
}
20
}
21
\details{
21
\details{
22
   \code{tabulate} is the workhorse for the \code{\link{table}} function.
22
   \code{tabulate} is the workhorse for the \code{\link{table}} function.
23
  
23
 
24
  If \code{bin} is a factor, its internal integer representation
24
  If \code{bin} is a factor, its internal integer representation
25
  is tabulated.
25
  is tabulated.
26
  
26
 
27
  If the elements of \code{bin} are numeric but not integers,
27
  If the elements of \code{bin} are numeric but not integers,
28
  they are truncated by \code{\link{as.integer}}.
28
  they are truncated by \code{\link{as.integer}}.
29
}
29
}
30
\value{
30
\value{
31
  An integer vector (without names).  There is a bin for each of the
31
  An integer vector (without names).  There is a bin for each of the