R/test_helper_functions.R
random_FLCatches_generator.Rd
Generates a list of identically sized FLCatch objects filled with normally distributed random numbers with a mean of 0. Used for automatic testing, particularly of the FLCatches_base<T> class in CPP.
random_FLCatches_generator(min_catches = 2, max_catches = 5, ...)
The minimum number of catches. Default is 2.
The maximum number of catches. Default is 5.
Other arguments passed to random_FLQuant_generator().
An FLCatches objects
flcs <- random_FLCatches_generator()
length(flcs)
#> [1] 3
summary(flcs)
#> An object of class "FLCatches"
#>
#> Elements: Catch 1 Catch 2 Catch 3
#>
#> Name: 529
#> Description: -1290
#> Range: min max pgroup minyear maxyear
#> 1 4 4 1 4
#> Quant: age
#> dim: 4 4 3 1 3
#> Name: 1760
#> Description: -572
#> Range: min max pgroup minyear maxyear
#> 1 4 4 1 4
#> Quant: age
#> dim: 4 4 3 1 3
#> Name: 575
#> Description: -1770
#> Range: min max pgroup minyear maxyear
#> 1 4 4 1 4
#> Quant: age
#> dim: 4 4 3 1 3
lapply(flcs, summary)
#> An object of class "FLCatch"
#>
#> Name: 529
#> Description: -1290
#> Quant: age
#> Dims: age year unit season area iter
#> 4 4 3 1 3 5
#>
#> Range: min max pgroup minyear maxyear
#> 1 4 4 1 4
#>
#> An object of class "FLCatch"
#>
#> Name: 1760
#> Description: -572
#> Quant: age
#> Dims: age year unit season area iter
#> 4 4 3 1 3 5
#>
#> Range: min max pgroup minyear maxyear
#> 1 4 4 1 4
#>
#> An object of class "FLCatch"
#>
#> Name: 575
#> Description: -1770
#> Quant: age
#> Dims: age year unit season area iter
#> 4 4 3 1 3 5
#>
#> Range: min max pgroup minyear maxyear
#> 1 4 4 1 4
#>
#> $`Catch 1`
#> NULL
#>
#> $`Catch 2`
#> NULL
#>
#> $`Catch 3`
#> NULL
#>