i_limit | R Documentation |
Create an iterator that limits the specified iterable to a specified number of items.
i_limit(iterable, n, ...)
iterable |
Iterable to iterate over. |
n |
Maximum number of values to return. |
... |
Extra arguments for |
Originally from the itertools
package.
an iteror which will stop after yielding n
values.
# Limit icount to only return three values
as.list(i_limit(icount(), 3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.