sweep,FLArray-method | R Documentation |
Use R's sweep method on FLCore classes
## S4 method for signature 'FLArray'
sweep(x, MARGIN, STATS, FUN = "-", check.margin = TRUE, ...)
## S4 method for signature 'FLPar'
sweep(x, MARGIN, STATS, FUN = "-", check.margin = TRUE, ...)
These methods call base R sweep
method on FLCore classes and then ensure
that the returned object is of same class.
sweep(x, MARGIN, STATS, FUN = "-", check.margin = TRUE, ...)
The FLR Team
sweep
flq <- FLQuant(rlnorm(90), dim=c(3,10), units='kg')
# Get ratio of max value by year
sweep(flq, 2, apply(flq, 2, max), "/")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.