Description Usage Arguments Details See Also Examples
Based on sweep
, operate on an array by a summary statistic function.
1 |
x |
An array. |
m |
Margin. 1 for rows, 2 for columns. |
s |
A summary statistic function such as |
f |
A function to be "swept" or "mopped" out, typically a binary operator. |
... |
Arguments passed to |
Essentially, mop
is a wrapper for sweep(x, MARGIN, apply(...), FUN)
. Useful for indexing variables by their means, for example, so that the magnitude of a value relative to its average is known. The function smop
simplifies mop
by operating only on columns. The function mop_div
simplifies mop
further by operating only on columns and assuming f
to be `/`
.
https://github.com/robertschnitman/afp, sweep
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.