Estimate Spawning fraction (S) of females for each sample in a survey. If multple years and/or regions are included in the data then a separate estimate of s can be provided by specifying the columns that correspond to these variables

Estimate_Spawning_fraction(data, Region = NULL, Time = NULL)

Arguments

data

A data.frame that contains at least the following columns: "No","Yes" and "Total". These correspond to the numbers of individuals in each that were in spawning condition. The function can determine these columns based on similarly named variables. Each line of the data.frame is assumed to be an indvivudal sample

Region

A string containing the column name for a region if desired as a grouping variable

Time

A string containing the column name for a timestep if desired as a grouping variable

Value

A data.frame that includes the spawning fraction, variance, standard error and coefficient of variation (CV).