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, ...)
The minimum number of catches. Default is 2.
The maximum number of FLCatches in the catches list. Default is 5.
Standard deviation of the randomly generated FLQuant slots.
Other arguments passed to random_FLCatches_generator().
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: -793
#> Description: -1170
#> 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: 1860
#> Description: -98.8
#> 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
#>
flf <- random_FLFishery_generator(fixed_dims = c(NA,10,1,1,1,1), max_dims = c(100,NA,NA,NA,NA,NA))