sweep-methods: Method sweep for FLCore classes

sweep,FLArray-methodR Documentation

Method sweep for FLCore classes

Description

Use R's sweep method on FLCore classes

Usage

## 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, ...)

Details

These methods call base R sweep method on FLCore classes and then ensure that the returned object is of same class.

Generic function

sweep(x, MARGIN, STATS, FUN = "-", check.margin = TRUE, ...)

Author(s)

The FLR Team

See Also

sweep

Examples


flq <- FLQuant(rlnorm(90), dim=c(3,10), units='kg')
# Get ratio of max value by year
sweep(flq, 2, apply(flq, 2, max), "/")

flr/FLCore documentation built on May 4, 2024, midnight