Lazily replicate magrittr chain

ripe(x, f, ...)

Arguments

x

chain

f

replication function

...

arguments to pass to f

Value

object that f outputs

See also

rerun

Other ripe: lazy()

Examples

stats::runif(20)%>% sample(4)%>% ripe(replicate,n=4,simplify=FALSE)
#> [[1]] #> [1] 0.6037504 0.1286026 0.7831407 0.2152727 #> #> [[2]] #> [1] 0.53876017 0.59447228 0.05270097 0.80009775 #> #> [[3]] #> [1] 0.2051797 0.9452205 0.3456832 0.2192360 #> #> [[4]] #> [1] 0.135991171 0.007208941 0.218338430 0.844163393 #>
stats::runif(20)%>% sample(4)%>% ripe(lapply,X=1:4)
#> [[1]] #> [1] 0.26123755 0.54383117 0.09462277 0.40199039 #> #> [[2]] #> [1] 0.91665390 0.39154211 0.07617631 0.99311809 #> #> [[3]] #> [1] 0.07588305 0.85417365 0.02662467 0.92787010 #> #> [[4]] #> [1] 0.5352176 0.4968253 0.4591390 0.9579191 #>