iter: Methods iter

iterR Documentation

Methods iter

Description

Select or modify iterations of an FLR object

Usage

iter(obj, ...)

## S4 method for signature 'FLArray'
iter(obj, iter)

Details

To extract or modify a subset of the iterations contained in an FLR object, the iter and iter<- methods can be used.

In complex objects with various FLQuant slots, the iter method checks whether individual slots contain more than one iteration, i.e. dims(object)[6] > 1. If a particular slot contains a single iteration, that is returned, otherwise the chosen iteration is selected. This is in contrast with the subset operator [, which does not carry out this check.

For objects of class FLModel, iters are extracted for slots of classes FLQuant, FLCohort and FLPar.

Generic function

iter(object) iter<-(object,value)

Author(s)

The FLR Team

See Also

FLComp, FLQuant

Examples

# For an FLQuant
  flq <- FLQuant(rnorm(800), dim=c(4,10,2), iter=10)
  iter(flq, 2)
# For the more complex FLStock object
  data(ple4)
  fls <- propagate(ple4, 10)
  # Extraction using iter...
    fls2 <- iter(fls, 2)
    summary(fls2)

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