The R Project SVN R

Rev

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

Rev 59039 Rev 61168
Line 42... Line 42...
42
}
42
}
43
\seealso{
43
\seealso{
44
  \code{\link{aperm}} for permuting the dimensions of arrays.
44
  \code{\link{aperm}} for permuting the dimensions of arrays.
45
}
45
}
46
\examples{
46
\examples{
47
a <- matrix(1:30, 5,6)
47
a <- matrix(1:30, 5, 6)
48
ta <- t(a) ##-- i.e.,  a[i, j] == ta[j, i] for all i,j :
48
ta <- t(a) ##-- i.e.,  a[i, j] == ta[j, i] for all i,j :
49
for(j in seq(ncol(a)))
49
for(j in seq(ncol(a)))
50
  if(! all(a[, j] == ta[j, ])) stop("wrong transpose")
50
  if(! all(a[, j] == ta[j, ])) stop("wrong transpose")
51
}
51
}
52
\keyword{array}
52
\keyword{array}