The R Project SVN R

Rev

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

Rev 68948 Rev 73030
Line 1... Line 1...
1
% File src/library/base/man/lower.tri.Rd
1
% File src/library/base/man/lower.tri.Rd
2
% Part of the R package, https://www.R-project.org
2
% Part of the R package, https://www.R-project.org
3
% Copyright 1995-2007 R Core Team
3
% Copyright 1995-2017 R Core Team
4
% Distributed under GPL 2 or later
4
% Distributed under GPL 2 or later
5
 
5
 
6
\name{lower.tri}
6
\name{lower.tri}
7
\alias{lower.tri}
7
\alias{lower.tri}
8
\alias{upper.tri}
8
\alias{upper.tri}
Line 14... Line 14...
14
\usage{
14
\usage{
15
lower.tri(x, diag = FALSE)
15
lower.tri(x, diag = FALSE)
16
upper.tri(x, diag = FALSE)
16
upper.tri(x, diag = FALSE)
17
}
17
}
18
\arguments{
18
\arguments{
-
 
19
  \item{x}{a matrix or other \R object with \code{length(dim(x)) == 2}.
-
 
20
    For back compatibility reasons, when the above is not fulfilled,
19
  \item{x}{a matrix.}
21
    \code{\link{as.matrix}(x)} is called first.}
20
  \item{diag}{logical.  Should the diagonal be included?}
22
  \item{diag}{logical.  Should the diagonal be included?}
21
}
23
}
22
\seealso{
24
\seealso{
-
 
25
  \code{\link{diag}}, \code{\link{matrix}}; further \code{\link{row}}
23
  \code{\link{diag}},
26
  and \code{\link{col}} on which \code{lower.tri()} and
24
  \code{\link{matrix}}.
27
  \code{upper.tri()} are built.
25
}
28
}
26
\examples{
29
\examples{
27
(m2 <- matrix(1:20, 4, 5))
30
(m2 <- matrix(1:20, 4, 5))
28
lower.tri(m2)
31
lower.tri(m2)
29
m2[lower.tri(m2)] <- NA
32
m2[lower.tri(m2)] <- NA