EVOLUTION-MANAGER
Edit File: take.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: Take a subset along an arbitrary dimension</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 take {plyr}"><tr><td>take {plyr}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Take a subset along an arbitrary dimension</h2> <h3>Description</h3> <p>Take a subset along an arbitrary dimension </p> <h3>Usage</h3> <pre> take(x, along, indices, drop = FALSE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>matrix or array to subset</p> </td></tr> <tr valign="top"><td><code>along</code></td> <td> <p>dimension to subset along</p> </td></tr> <tr valign="top"><td><code>indices</code></td> <td> <p>the indices to select</p> </td></tr> <tr valign="top"><td><code>drop</code></td> <td> <p>should the dimensions of the array be simplified? Defaults to <code>FALSE</code> which is the opposite of the useful R default.</p> </td></tr> </table> <h3>Examples</h3> <pre> x <- array(seq_len(3 * 4 * 5), c(3, 4, 5)) take(x, 3, 1) take(x, 2, 1) take(x, 1, 1) take(x, 3, 1, drop = TRUE) take(x, 2, 1, drop = TRUE) take(x, 1, 1, drop = TRUE) </pre> <hr /><div style="text-align: center;">[Package <em>plyr</em> version 1.8.7 <a href="00Index.html">Index</a>]</div> </body></html>