The R Project SVN R

Rev

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

Rev 28111 Rev 28165
Line 16... Line 16...
16
\description{
16
\description{
17
  Returns the first or last parts of a vector, matrix, data frame or function.
17
  Returns the first or last parts of a vector, matrix, data frame or function.
18
}
18
}
19
\usage{
19
\usage{
20
head(x, \dots)
20
head(x, \dots)
21
\method{head}{default}(x, n=6)
21
\method{head}{default}(x, n=6, \dots)
22
\method{head}{data.frame}(x, n=6)
22
\method{head}{data.frame}(x, n=6, \dots)
23
 
23
 
24
tail(x, \dots)
24
tail(x, \dots)
25
\method{tail}{default}(x, n=6)
25
\method{tail}{default}(x, n=6, \dots)
26
\method{tail}{data.frame}(x, n=6)
26
\method{tail}{data.frame}(x, n=6, \dots)
27
}
27
}
28
\arguments{
28
\arguments{
29
  \item{x}{an object}
29
  \item{x}{an object}
30
  \item{n}{size for the resulting object: number of elements for a
30
  \item{n}{size for the resulting object: number of elements for a
31
    vector (including lists), rows for a matrix or data frame or
31
    vector (including lists), rows for a matrix or data frame or
32
    lines for a function.}
32
    lines for a function.}
-
 
33
  \item{\dots}{arguments to be passed to or from other methods.}
33
}
34
}
34
\details{
35
\details{
35
  For matrices and data frames, the first/last \code{n} rows are returned.
36
  For matrices and data frames, the first/last \code{n} rows are returned.
36
  For functions, the first/last \code{n} lines of the deparsed function are
37
  For functions, the first/last \code{n} lines of the deparsed function are
37
  returned as character strings.
38
  returned as character strings.