Package: iterors 1.0

iterors: Fast, Compact Iterators and Tools

A fresh take on iterators in R. Designed to be cross-compatible with the 'iterators' package, but using the 'nextOr' method will offer better performance as well as more compact code. With batteries included: includes a collection of iterator constructors and combinators ported and refined from the 'iterators', 'itertools', and 'itertools2' packages.

Authors:Peter Meilstrup [cre, aut, cph], Folashade Daniel [aut], Revolution Analytics [aut, cph], Steve Weston [aut, cph], John A. Ramey [aut, cph], Kayla Schaefer [aut], Hadley Wickham [aut]

iterors_1.0.tar.gz
iterors_1.0.zip(r-4.7)iterors_1.0.zip(r-4.6)iterors_1.0.zip(r-4.5)
iterors_1.0.tgz(r-4.6-any)iterors_1.0.tgz(r-4.5-any)
iterors_1.0.tar.gz(r-4.7-any)iterors_1.0.tar.gz(r-4.6-any)
iterors_1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
iterors/json (API)

# Install 'iterors' in R:
install.packages('iterors', repos = c('https://crowding.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/crowding/iterors/issues

Pkgdown/docs site:https://crowding.github.io

On CRAN:

Conda:

6.65 score 5 stars 1 packages 24 scripts 191 downloads 71 exports 1 dependencies

Last updated from:ec34d9324e. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK151
source / vignettesOK154
linux-release-x86_64OK142
macos-release-arm64OK98
macos-oldrel-arm64OK139
windows-develOK181
windows-releaseOK162
windows-oldrelOK191
wasm-releaseOK107

Exports:concatconsumecountdotproducthasNexti_accumi_applyi_breaki_chaini_chunki_concati_dropi_dropwhilei_enumi_enumeratei_keepi_keepwhilei_limiti_mapi_maski_padi_recyclei_repi_repeati_rlei_rleinvi_roundrobini_slicei_stari_starmapi_teei_timeouti_uniquei_windowi_zipi_zip_longesticombinationsicounticountnidedupidivienumerateigridihasNextipermutationsirbinomiread.tableireadBinireaddfireadLinesireplayirnbinomiRNGStreamiRNGSubStreamirnormirpoisirunifis.iterorisampleiseqiseq_alongisplititabulateiterormakeIwrappernextOrnthquantifyrecordreducetake

Dependencies:rlang

Writing Custom Iterators
What methods are needed for an iteror? | Handling the end of iteration | Breaking out of a loop at end of iteration | Detecting end of iteration with a sentinel value | Unsafe sentinel values | Safe sentinel values | A simple iterator | A stateful iterator that stops | Using an iterator inside an iterator | A recycling iterator | Limiting infinite iterators | Conclusion

Last update: 2023-05-18
Started: 2023-05-06

The iterors package: Fast, compact iteration and tools
Features | How is it different from iterators? | More reading | Installation | License

Last update: 2023-05-14
Started: 2023-05-07

Index of iteror functions by task
Basic methods | Consuming / summarizing an iteror | Iterate over given data | Counting or other mathematically defined processes | Random number generation | Iterators dealing with files or functions | Custom iterators | Higher order iterator functions | Iterators as sequences -- Looping, repeating, indexing | Operating on data within iterators | Selection, filtering, limiting | Combining / splitting multiple iterators

Last update: 2023-05-14
Started: 2023-05-02

Using the iterors package
Introduction | Some Special Iterators

Last update: 2023-05-10
Started: 2023-05-07

Cross reference from iterarors/itertools to iterors

Last update: 2023-05-09
Started: 2023-05-02

Readme and manuals

Help Manual

Help pageTopics
Collect all (or some given number of) values from an iteror, returning a vector of the given type.as.character.iteror as.double.iteror as.list.iteror as.logical.iteror as.numeric.iteror as.vector.iteror
Concatenate contents of multiple iterators into a vector.concat concat.default concat.iteror
Consumes the first n elements of an iteratorconsume consume.iteror
Consumes an iterator and computes its lengthcount
Computes the dot product of two iterable objects.dotproduct
Does This Iterator Have A Next ElementhasNext hasNext.ihasNext ihasNext
Apply a function to each element of an iterator.i_apply
Create an iterator that can be told to stop.i_break
Combine an iterator's values into chunks.i_chunk
Iteror that chains multiple arguments together into a single iteratori_chain i_concat
Iterator that drops elements until the predicate function returns FALSEi_dropwhile
Iterator that returns the elements of an object along with their indicesienumerate i_enum i_enumerate i_enumerate.array i_enumerate.default
Iterator that filters elements not satisfying a predicate functionifilter ifilterfalse i_drop i_keep
Iterator that returns elements while a predicate function returns TRUEi_keepwhile
Limit the length of an iterator.i_limit
Iterator that applies a given function to several iterables concurrently.i_map
Iterator that filters elements where corresponding selector is false.i_mask
Iterator that returns an object followed indefinitely by a fill valuei_pad
Create a recycling iteratori_recycle
Repeat values from an iterator.i_rep
Create a repeating iteratori_repeat
Run-length encoding iterator.i_rle i_rleinv
Iteror that traverses each given iterable in a roundrobin orderi_roundrobin
Iteror that returns selected elements from an iterable.i_slice
Iteror that applies a given function to the elements of an iterable.i_star i_starmap
Create multiple iterators from one sourcei_tee
Create a timeout iteratori_timeout
Iterator that extracts the unique elements from an iterable objecti_unique
Construct a sliding window over an iteratori_window
Combine several iterables in parallel.i_zip i_zip_longest
Iterator that generates all combinations of a vector taken m at a time.icombinations
Counting Iteratorsicount icountn
Drop duplicated items from an iterator.idedup
Dividing Iteratoridiv
Iterator that covers the Cartesian product of the arguments.igrid
Iterator that generates all permutations of a vector.ipermutations
Iterator over Rows of a Data Frame Stored in a Fileiread.table
Create an iterator to read binary data from a connectionireadBin
Create an iterator to read data frames from filesireaddf
Iterator over Lines of Text from a ConnectionireadLines
Iterators returning distant random-number seeds.iRNGStream iRNGSubStream
Random Number Iteratorsirbinom irnbinom irnorm irpois irunif isample
'is.iteror' indicates if an object is an iteror.is.iterator is.iteror
Iterators for sequence generationiseq iseq_along
Split Iteratorisplit
Iterator that maps a function to a sequence of numeric valuesitabulate
Make an iteror from a given object.iteror iteror.connection iteror.default iteror.iter
Iterate over an array or data frame by a specified dimension.iteror.array iteror.data.frame iteror.matrix
Construct an iteror object with custom-programmed behavior.iteror.function
Iterator Constructor-Constructor Function WrappermakeIwrapper
Retreive the next element from an iteror.nextOr
Returns the nth item of an iterornth
Count the number of times an iterable object is TRUEquantify
Wrap an iteror to appear as a Python iterator or vice versa.iteror.python.builtin.object r_to_py.iteror
Record and replay iteratorsireplay record
Compute the sum, product, or general reduction of an iterator.i_accum prod.iteror reduce reduce.iteror sum.iteror
Return the first n elements of an iterable object in a vector.take take.default take.iteror