Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

r_ply

Replicate expression and discard results.


Description

Evalulate expression n times then discard results

Usage

r_ply(.n, .expr, .progress = "none", .print = FALSE)

Arguments

.n

number of times to evaluate the expression

.expr

expression to evaluate

.progress

name of the progress bar to use, see create_progress_bar

.print

automatically print each result? (default: FALSE)

Details

This function runs an expression multiple times, discarding the results. This function is equivalent to replicate, but never returns anything

References

Hadley Wickham (2011). The Split-Apply-Combine Strategy for Data Analysis. Journal of Statistical Software, 40(1), 1-29. http://www.jstatsoft.org/v40/i01/.

Examples

r_ply(10, plot(runif(50)))
r_ply(25, hist(runif(1000)))

plyr

Tools for Splitting, Applying and Combining Data

v1.8.6
MIT + file LICENSE
Authors
Hadley Wickham [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.