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, ...)
An FLCatches objects
flcs <- random_FLCatches_generator()
length(flcs)
#> [1] 5
summary(flcs)
#> An object of class "FLCatches"
#>
#> Elements: Catch 1 Catch 2 Catch 3 Catch 4 Catch 5
#>
#> Name: -1460
#> Description: -112
#> Range: min max pgroup minyear maxyear
#> 1 3 3 1 1
#> Quant: age
#> dim: 3 1 5 3 2
#> Name: -399
#> Description: 1340
#> Range: min max pgroup minyear maxyear
#> 1 3 3 1 1
#> Quant: age
#> dim: 3 1 5 3 2
#> Name: 489
#> Description: -507
#> Range: min max pgroup minyear maxyear
#> 1 3 3 1 1
#> Quant: age
#> dim: 3 1 5 3 2
#> Name: -1080
#> Description: -1710
#> Range: min max pgroup minyear maxyear
#> 1 3 3 1 1
#> Quant: age
#> dim: 3 1 5 3 2
#> Name: -306
#> Description: 852
#> Range: min max pgroup minyear maxyear
#> 1 3 3 1 1
#> Quant: age
#> dim: 3 1 5 3 2
lapply(flcs, summary)
#> An object of class "FLCatch"
#>
#> Name: -1460
#> Description: -112
#> Quant: age
#> Dims: age year unit season area iter
#> 3 1 5 3 2 2
#>
#> Range: min max pgroup minyear maxyear
#> 1 3 3 1 1
#>
#> An object of class "FLCatch"
#>
#> Name: -399
#> Description: 1340
#> Quant: age
#> Dims: age year unit season area iter
#> 3 1 5 3 2 2
#>
#> Range: min max pgroup minyear maxyear
#> 1 3 3 1 1
#>
#> An object of class "FLCatch"
#>
#> Name: 489
#> Description: -507
#> Quant: age
#> Dims: age year unit season area iter
#> 3 1 5 3 2 2
#>
#> Range: min max pgroup minyear maxyear
#> 1 3 3 1 1
#>
#> An object of class "FLCatch"
#>
#> Name: -1080
#> Description: -1710
#> Quant: age
#> Dims: age year unit season area iter
#> 3 1 5 3 2 2
#>
#> Range: min max pgroup minyear maxyear
#> 1 3 3 1 1
#>
#> An object of class "FLCatch"
#>
#> Name: -306
#> Description: 852
#> Quant: age
#> Dims: age year unit season area iter
#> 3 1 5 3 2 2
#>
#> Range: min max pgroup minyear maxyear
#> 1 3 3 1 1
#>
#> $`Catch 1`
#> NULL
#>
#> $`Catch 2`
#> NULL
#>
#> $`Catch 3`
#> NULL
#>
#> $`Catch 4`
#> NULL
#>
#> $`Catch 5`
#> NULL
#>