The R Project SVN R

Rev

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

Rev 22803 Rev 27117
Line 7... Line 7...
7
}
7
}
8
\usage{
8
\usage{
9
slice.index(x, MARGIN)
9
slice.index(x, MARGIN)
10
}
10
}
11
\arguments{
11
\arguments{
12
  \item{x}{an array.  If \code{x} has no dimensiion attribute, it is
12
  \item{x}{an array.  If \code{x} has no dimension attribute, it is
13
    considered a one-dimensional array.}
13
    considered a one-dimensional array.}
14
  \item{MARGIN}{an integer giving the dimension number to slice by.}
14
  \item{MARGIN}{an integer giving the dimension number to slice by.}
15
}
15
}
16
\value{
16
\value{
17
  An integer array \code{y} with dimensions corresponding to those of
17
  An integer array \code{y} with dimensions corresponding to those of
Line 19... Line 19...
19
  to dimension \code{MARGIN} have value \code{i}.
19
  to dimension \code{MARGIN} have value \code{i}.
20
}
20
}
21
\seealso{
21
\seealso{
22
  \code{\link{row}} and \code{\link{col}} for determining row and column
22
  \code{\link{row}} and \code{\link{col}} for determining row and column
23
  indexes; in fact, these are special cases of \code{slice.index}
23
  indexes; in fact, these are special cases of \code{slice.index}
24
  corresponding to \code{MARGIN} equal to 1 and 2, respectively.
24
  corresponding to \code{MARGIN} equal to 1 and 2, respectively when \code{x}
-
 
25
  is a matrix.
25
}
26
}
26
\examples{
27
\examples{
27
x <- array(1 : 24, c(2, 3, 4))
28
x <- array(1 : 24, c(2, 3, 4))
28
slice.index(x, 2)
29
slice.index(x, 2)
29
}
30
}