EVOLUTION-MANAGER
Edit File: nMatrix-class.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: Class "nMatrix" of Non-zero Pattern Matrices</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 nMatrix-class {Matrix}"><tr><td>nMatrix-class {Matrix}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Class "nMatrix" of Non-zero Pattern Matrices</h2> <h3>Description</h3> <p>The <code>nMatrix</code> class is the virtual “mother” class of all <em><b>n</b>on-zero pattern</em> (or simply <em>patter<b>n</b></em>) matrices in the <span class="pkg">Matrix</span> package. </p> <h3>Slots</h3> <p>Common to <em>all</em> matrix object in the package: </p> <dl> <dt><code>Dim</code>:</dt><dd><p>Object of class <code>"integer"</code> - the dimensions of the matrix - must be an integer vector with exactly two non-negative values.</p> </dd> <dt><code>Dimnames</code>:</dt><dd><p>list of length two; each component containing NULL or a <code><a href="../../base/html/character.html">character</a></code> vector length equal the corresponding <code>Dim</code> element.</p> </dd> </dl> <h3>Methods</h3> <p>There is a bunch of coercion methods (for <code><a href="../../methods/html/as.html">as</a>(..)</code>), e.g., </p> <dl> <dt>coerce</dt><dd><p><code>signature(from = "matrix", to = "nMatrix")</code>: Note that these coercions (must) coerce <code><a href="../../base/html/NA.html">NA</a></code>s to non-zero, hence conceptually <code>TRUE</code>. This is particularly important when <code><a href="sparseMatrix-class.html">sparseMatrix</a></code> objects are coerced to <code>"nMatrix"</code> and hence to <code><a href="nsparseMatrix-classes.html">nsparseMatrix</a></code>. </p> </dd> <dt>coerce</dt><dd><p><code>signature(from = "dMatrix", to = "nMatrix")</code>, and</p> </dd> <dt>coerce</dt><dd><p><code>signature(from = "lMatrix", to = "nMatrix")</code>: For dense matrices with <code><a href="../../base/html/NA.html">NA</a></code>s, these coercions are valid since <span class="pkg">Matrix</span> version 1.2.0 (still with a <code><a href="../../base/html/warning.html">warning</a></code> or a <code><a href="../../base/html/message.html">message</a></code> if <code>"Matrix.warn"</code>, or <code>"Matrix.verbose"</code> <code><a href="../../base/html/options.html">options</a></code> are set.)</p> </dd> <dt>coerce</dt><dd><p><code>signature(from = "nMatrix", to = "matrix")</code>: ... </p> </dd> <dt>coerce</dt><dd><p><code>signature(from = "nMatrix", to = "dMatrix")</code>: ... </p> </dd> <dt>coerce</dt><dd><p><code>signature(from = "nMatrix", to = "lMatrix")</code>: ... </p> </dd> </dl> <p>— — — </p> <p>Additional methods contain group methods, such as </p> <dl> <dt>Ops</dt><dd><p><code>signature(e1 = "nMatrix", e2 = "....")</code>, ...</p> </dd> <dt>Arith</dt><dd><p><code>signature(e1 = "nMatrix", e2 = "....")</code>, ...</p> </dd> <dt>Compare</dt><dd><p><code>signature(e1 = "nMatrix", e2 = "....")</code>, ...</p> </dd> <dt>Logic</dt><dd><p><code>signature(e1 = "nMatrix", e2 = "....")</code>, ...</p> </dd> <dt>Summary</dt><dd><p><code>signature(x = "nMatrix", "....")</code>, ...</p> </dd> </dl> <h3>See Also</h3> <p>The classes <code><a href="dMatrix-class.html">lMatrix</a></code>, <code><a href="nsparseMatrix-classes.html">nsparseMatrix</a></code>, and the mother class, <code><a href="Matrix-class.html">Matrix</a></code>. </p> <h3>Examples</h3> <pre> getClass("nMatrix") L3 <- Matrix(upper.tri(diag(3))) L3 # an "ltCMatrix" as(L3, "nMatrix") # -> ntC* ## similar, not using Matrix() as(upper.tri(diag(3)), "nMatrix")# currently "ngTMatrix" </pre> <hr /><div style="text-align: center;">[Package <em>Matrix</em> version 1.2-17 <a href="00Index.html">Index</a>]</div> </body></html>