random_FLFisheries_generator: Generate a randomly filled and sized FLFisheries object

Description Usage Arguments Value Examples

Description

Generate a randomly sized FLFisheries object filled with normally distributed random numbers with a mean of 0. Used for automatic testing, particularly of the FLFisheries_base<T> class in CPP.

Usage

1
random_FLFisheries_generator(min_fisheries = 2, max_fisheries = 5, ...)

Arguments

min_fisheries

The minimum number of FLFisheries in the fisheries list. Default is 2.

max_fisheries

The maximum number of FLFisheries in the fisheries list. Default is 5.

min_catches

The minimum number of catches. Default is 2.

max_catches

The maximum number of FLCatches in the catches list. Default is 5.

fixed_dims

A vector of length 6 with the fixed length of each of the FLQuant dimensions. If any value is NA it is randomly set using the max_dims argument. Default value is rep(NA,6).

max_dims

A vector of length 6 with maximum size of each of the FLQuant dimensions. Default value is c(5,5,5,4,4,10).

sd

The standard deviation of the random numbers. Passed to rnorm() Default is 100.

Value

An FLFishery object

Examples

1
2
3
4
5
flf <- random_FLFishery_list_generator()
summary(flf)
flf <- random_FLFishery_generator(fixed_dims = c(NA,10,1,1,1,1))
lapply(flf, summary)
flf <- random_FLFishery_generator(fixed_dims = c(NA,10,1,1,1,1), max_dims = c(100,NA,NA,NA,NA,NA))

drfinlayscott/FLRcppAdolc documentation built on May 15, 2019, 1:57 p.m.