EVOLUTION-MANAGER
Edit File: lower.tri.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Lower and Upper Triangular Part of a Matrix</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for lower.tri {base}"><tr><td>lower.tri {base}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Lower and Upper Triangular Part of a Matrix</h2> <h3>Description</h3> <p>Returns a matrix of logicals the same size of a given matrix with entries <code>TRUE</code> in the lower or upper triangle. </p> <h3>Usage</h3> <pre> lower.tri(x, diag = FALSE) upper.tri(x, diag = FALSE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>a matrix or other <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> object with <code>length(dim(x)) == 2</code>. For back compatibility reasons, when the above is not fulfilled, <code><a href="matrix.html">as.matrix</a>(x)</code> is called first.</p> </td></tr> <tr valign="top"><td><code>diag</code></td> <td> <p>logical. Should the diagonal be included?</p> </td></tr> </table> <h3>See Also</h3> <p><code><a href="diag.html">diag</a></code>, <code><a href="matrix.html">matrix</a></code>; further <code><a href="row.html">row</a></code> and <code><a href="col.html">col</a></code> on which <code>lower.tri()</code> and <code>upper.tri()</code> are built. </p> <h3>Examples</h3> <pre> (m2 <- matrix(1:20, 4, 5)) lower.tri(m2) m2[lower.tri(m2)] <- NA m2 </pre> <hr /><div style="text-align: center;">[Package <em>base</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>