EVOLUTION-MANAGER
Edit File: isplit.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: Split Iterator</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 isplit {iterators}"><tr><td>isplit {iterators}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Split Iterator</h2> <h3>Description</h3> <p>Returns an iterator that divides the data in the vector <code>x</code> into the groups defined by <code>f</code>. </p> <h3>Usage</h3> <pre> isplit(x, f, drop=FALSE, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>vector or data frame of values to be split into groups.</p> </td></tr> <tr valign="top"><td><code>f</code></td> <td> <p>a factor or list of factors used to categorize <code>x</code>.</p> </td></tr> <tr valign="top"><td><code>drop</code></td> <td> <p>logical indicating if levels that do not occur should be dropped.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>current ignored.</p> </td></tr> </table> <h3>Value</h3> <p>The split iterator. </p> <h3>See Also</h3> <p><code><a href="../../base/html/split.html">split</a></code> </p> <h3>Examples</h3> <pre> x <- rnorm(200) f <- factor(sample(1:10, length(x), replace=TRUE)) it <- isplit(x, f) expected <- split(x, f) for (i in expected) { actual <- nextElem(it) stopifnot(actual$value == i) } </pre> <hr /><div style="text-align: center;">[Package <em>iterators</em> version 1.0.14 <a href="00Index.html">Index</a>]</div> </body></html>