EVOLUTION-MANAGER
Edit File: idiv.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: Dividing 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 idiv {iterators}"><tr><td>idiv {iterators}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Dividing Iterator</h2> <h3>Description</h3> <p>Returns an iterator that returns pieces of numeric value. </p> <h3>Usage</h3> <pre> idiv(n, ..., chunks, chunkSize) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>n</code></td> <td> <p>number of times that the iterator will fire. If not specified, it will count forever.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>unused.</p> </td></tr> <tr valign="top"><td><code>chunks</code></td> <td> <p>the number of pieces that <code>n</code> should be divided into. This is useful when you know the number of pieces that you want. If specified, then <code>chunkSize</code> should not be.</p> </td></tr> <tr valign="top"><td><code>chunkSize</code></td> <td> <p>the maximum size of the pieces that <code>n</code> should be divided into. This is useful when you know the size of the pieces that you want. If specified, then <code>chunks</code> should not be.</p> </td></tr> </table> <h3>Value</h3> <p>The dividing iterator. </p> <h3>Examples</h3> <pre> # divide the value 10 into 3 pieces it <- idiv(10, chunks=3) nextElem(it) nextElem(it) nextElem(it) try(nextElem(it)) # expect a StopIteration exception # divide the value 10 into pieces no larger than 3 it <- idiv(10, chunkSize=3) nextElem(it) nextElem(it) nextElem(it) nextElem(it) try(nextElem(it)) # expect a StopIteration exception </pre> <hr /><div style="text-align: center;">[Package <em>iterators</em> version 1.0.14 <a href="00Index.html">Index</a>]</div> </body></html>