Description Usage Arguments Value Examples
Simpler to demonstrate:
1 2 3 | do.on( find.funs(), environment( get( .)))
# same as:
lapply( find.funs(), function( x) environment( get( x)))
|
do.on evaluates expr for all elements of x. The expression should involve the symbol ., and will be cast into a function which has an argument . and knows about any dotdotdot arguments passed to do.on (and objects in the function that calls do.on). If x is atomic (e.g. character or numeric, but not list) and lacks names, it will be given names via named. With do.on, you are calling sapply, so the result is simplified if possible, unless simplify=FALSE (or simplify="array", for which see sapply). With FOR, you are calling lapply, so no simplication is tried; this is often more useful for programming.
1 2 |
x |
thing to be iterated over. Names are copied to the result, and are pre-allocated if required as per Description |
expr |
expression, presumably involving the symbol |
... |
other "arguments" for |
simplify |
as per |
do.on |
as per |
FOR |
a list of the same length as |
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.