cull_for_do | R Documentation |
The do()
function facilitates easy replication for
randomization tests and bootstrapping (among other things). Part of what
makes this particularly useful is the ability to cull from the objects
produced those elements that are useful for subsequent analysis.
cull_for_do
does this culling. It is generic, and users
can add new methods to either change behavior or to handle additional
classes of objects.
cull_for_do(object, ...)
object |
an object to be culled |
... |
additional arguments (currently ignored) |
When do(n) * expression
is evaluated, expression
is evaluated n
times to produce a list of n
result objects.
cull_for_do
is then applied to each element of this list to
extract from it the information that should be stored. For example,
when applied to a object of class "lm"
,
the default cull_for_do
extracts the coefficients, coefficient
of determinism, an the estimate for the variance, etc.
cull_for_do(lm(length ~ width, data = KidsFeet))
do(1) * lm(length ~ width, data = KidsFeet)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.