EVOLUTION-MANAGER
Edit File: drop.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: Drop Redundant Extent Information</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 drop {base}"><tr><td>drop {base}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Drop Redundant Extent Information</h2> <h3>Description</h3> <p>Delete the dimensions of an array which have only one level. </p> <h3>Usage</h3> <pre> drop(x) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>an array (including a matrix).</p> </td></tr> </table> <h3>Value</h3> <p>If <code>x</code> is an object with a <code>dim</code> attribute (e.g., a matrix or <code><a href="array.html">array</a></code>), then <code>drop</code> returns an object like <code>x</code>, but with any extents of length one removed. Any accompanying <code>dimnames</code> attribute is adjusted and returned with <code>x</code>: if the result is a vector the <code>names</code> are taken from the <code>dimnames</code> (if any). If the result is a length-one vector, the names are taken from the first dimension with a dimname. </p> <p>Array subsetting (<code><a href="Extract.html">[</a></code>) performs this reduction unless used with <code>drop = FALSE</code>, but sometimes it is useful to invoke <code>drop</code> directly. </p> <h3>See Also</h3> <p><code><a href="../../stats/html/add1.html">drop1</a></code> which is used for dropping terms in models. </p> <h3>Examples</h3> <pre> dim(drop(array(1:12, dim = c(1,3,1,1,2,1,2)))) # = 3 2 2 drop(1:3 %*% 2:4) # scalar product </pre> <hr /><div style="text-align: center;">[Package <em>base</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>