Methods to extend objects of various FLR classes along the iter
(6th FLQuant) dimension. Objects must generally have a single
iter
to be extended. The new iterations can be filled with copies
of the existing, or remain as NA
.
Arguments
- object
Object to be propagated.
- fill.iter
Should first array be copied to others? Defaults to FALSE.
- iters
No. of iterations in output.
Examples
# An FLQuant with one iter (dim(flq)[6] == 1)
flq <- FLQuant(rnorm(80), dim=c(4,20), quant='age')
# can now be extended along the `iter` dimension, with
#' copies of the first
propagate(flq, 100)
#> An object of class "FLQuant"
#> iters: 100
#>
#> , , unit = unique, season = all, area = unique
#>
#> year
#> age 1 2 3 4 5
#> 1 -0.971903(0) -1.255819(0) -1.561730(0) -0.215550(0) 0.831618(0)
#> 2 -0.029049(0) 1.252001(0) 0.363128(0) 1.342257(0) -0.726416(0)
#> 3 -1.578651(0) 0.725936(0) -1.324855(0) 0.190960(0) -0.538961(0)
#> 4 0.732943(0) -0.650217(0) -2.189010(0) 1.220296(0) -0.548577(0)
#> year
#> age 6 7 8 9 10
#> 1 -0.898656(0) -0.899102(0) 1.016168(0) 0.755474(0) 1.233541(0)
#> 2 0.059854(0) -0.068150(0) -1.087255(0) -1.783025(0) -0.946419(0)
#> 3 -1.308017(0) -0.024684(0) -1.405239(0) -0.846609(0) -0.699733(0)
#> 4 -1.550817(0) 0.278563(0) -1.477079(0) -1.150954(0) -0.103936(0)
#> year
#> age 11 12 13 14 15
#> 1 0.231130(0) -0.346203(0) 0.460412(0) 0.762842(0) 0.057472(0)
#> 2 1.172588(0) -0.317502(0) 0.315868(0) 0.355808(0) -0.021236(0)
#> 3 -2.282545(0) 1.647992(0) 0.738424(0) 2.273589(0) -0.776503(0)
#> 4 -0.659351(0) 3.161160(0) -0.377477(0) -0.142483(0) 0.527718(0)
#> year
#> age 16 17 18 19 20
#> 1 0.993382(0) -0.950556(0) -1.399191(0) 1.520860(0) 1.080170(0)
#> 2 0.719519(0) 0.182349(0) 0.390854(0) -0.383122(0) -0.979794(0)
#> 3 2.000959(0) -0.244649(0) -0.249553(0) -0.130078(0) -1.069041(0)
#> 4 -0.368017(0) 1.127821(0) -1.193375(0) -1.218575(0) -0.163427(0)
#>
#> units: NA
# or without
iter(propagate(flq, 100, fill.iter=FALSE), 2)
#> An object of class "FLQuant"
#> , , unit = unique, season = all, area = unique
#>
#> year
#> age 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#> 1 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
#> 2 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
#> 3 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
#> 4 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
#>
#> units: NA