List Comprehensions

Provides 'Python'-style list comprehensions. List comprehension expressions use usual loops (for(), while() and repeat()) and usual if() as list producers. In many cases it gives more concise notation than standard "*apply + filter" strategy.


News

0.6.5 (09.04.2019)

  • add 'alter' function for conditional lists/data.frames modification

0.6.0 (18.03.2019)

  • add iterations over multiple lists: to_vec(for(i, j in numerate(letters)) if(i %% 2==0) paste(i, j))
  • add function 'lag_list': x -> list(x[i-1], x[i])

0.5.4 (06.03.2019)

  • Initial release

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("comprehenr")

0.6.7 by Gregory Demin, 6 months ago


https://github.com/gdemin/comprehenr


Report a bug at https://github.com/gdemin/comprehenr/issues


Browse source code at https://github.com/cran/comprehenr


Authors: Gregory Demin [aut, cre]


Documentation:   PDF Manual  


GPL-2 license


Suggests knitr, testthat


See at CRAN