sweep | R Documentation |
Sweep a vector through a float matrix.
## S4 method for signature 'float32'
sweep(x, MARGIN, STATS, FUN = "-", check.margin = TRUE, ...)
x |
A float vector/matrix. |
MARGIN |
1 (rows) or 2 (columns) |
STATS |
Vector to sweep out. |
FUN |
Sweeping function; must be one of |
check.margin |
Should x/STATS margin lengths be checked? |
... |
Theoretically these are additional arguments passed to an arbitrary function. However, we only support basic arithmetic, so they are ignored. |
Note that if the length of STATS
does not recycle exactly across
MARGIN
, the results here will differ slightly from the results of
base R.
A matrix of the same type as the highest precision input.
library(float)
s = flrunif(10, 3)
sweep(s, 2, fl(1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.