iter {FLCore} | R Documentation

## Select or modify iterations of an FLR object

### Description

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

In complex 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 one 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)

### Methods

signature(object=FLQuant) :
  Describe method
signature(object=FLComp) :
  Describe method
signature(object=FLQuants) :
  Describe method
signature(object=FLPar) :
  Describe method

### Author(s)

The FLR Team

### See Also

FLComp, FLQuant-class

### Examples

    flq <- FLQuant(rnorm(800), dim=c(4,10,2), iter=10)
    iter(flq, 2)

    fls <- FLStock(catch.n=flq, m=FLQuant(0.2, dim=c(4,10,2)))
    fls2 <- iter(fls, 2)
    summary(fls2)

[Package FLCore version 2.2 Index]