-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathreplicate.Rd
More file actions
33 lines (29 loc) · 869 Bytes
/
replicate.Rd
File metadata and controls
33 lines (29 loc) · 869 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/replicate.R
\name{replicate}
\alias{replicate}
\title{Same as \code{\link[base:lapply]{base::replicate()}} but with a progress bar.}
\usage{
replicate(
n,
expr,
simplify = "array",
format = "Replicating : [:bar] :percent in :elapsed",
...
)
}
\arguments{
\item{n}{Integer: the number of replications.}
\item{expr}{The expression (a language object, usually a call) to
evaluate repeatedly.}
\item{simplify}{Passed to \code{\link[base:lapply]{base::sapply()}}, see the docs there.}
\item{format}{Progress bar format.}
\item{...}{Extra arguments are passed to \code{progress_bar$new()}.}
}
\description{
Same as \code{\link[base:lapply]{base::replicate()}} but with a progress bar.
}
\examples{
replicate(50000, rnorm(1) > 1.65) |>
(\(x) list(mean = mean(x), sd = sd(x)))()
}