R/test_helper_functions.R
random_FLFishery_generator.Rd
Generate a randomly sized FLFishery object filled with normally distributed random numbers with a mean of 0. Used for automatic testing, particularly of the FLFishery_base<T> class in CPP.
random_FLFishery_generator(min_catches = 2, max_catches = 5, sd = 1, ...)
An FLFishery object
flf <- random_FLFishery_generator(fixed_dims = c(NA,10,1,1,1,1))
lapply(flf, summary)
#> An object of class "FLCatch"
#>
#> Name: -810
#> Description: 1010
#> Quant: age
#> Dims: age year unit season area iter
#> 3 10 1 1 1 1
#>
#> Range: min max pgroup minyear maxyear
#> 1 3 3 1 10
#>
#> An object of class "FLCatch"
#>
#> Name: 1530
#> Description: 404
#> Quant: age
#> Dims: age year unit season area iter
#> 3 10 1 1 1 1
#>
#> Range: min max pgroup minyear maxyear
#> 1 3 3 1 10
#>
#> An object of class "FLCatch"
#>
#> Name: 831
#> Description: 287
#> Quant: age
#> Dims: age year unit season area iter
#> 3 10 1 1 1 1
#>
#> Range: min max pgroup minyear maxyear
#> 1 3 3 1 10
#>
#> An object of class "FLCatch"
#>
#> Name: 2180
#> Description: 677
#> Quant: age
#> Dims: age year unit season area iter
#> 3 10 1 1 1 1
#>
#> Range: min max pgroup minyear maxyear
#> 1 3 3 1 10
#>
#> $`Catch 1`
#> NULL
#>
#> $`Catch 2`
#> NULL
#>
#> $`Catch 3`
#> NULL
#>
#> $`Catch 4`
#> NULL
#>
flf <- random_FLFishery_generator(fixed_dims = c(NA,10,1,1,1,1), max_dims = c(100,NA,NA,NA,NA,NA))