addcount | R Documentation |
addcount given an input data.frame containing catch, diver, and year as variables this function first sums the catch by diver, by year, then counts each diver's occurrence across the years, and each diver's catch. Then stepping through each diver it populates two new colummns named 'count' and 'avC'.
addcount(indat, varid = "diver", group = "year", catch = "catch")
indat |
a data.frame containing at least columns named 'catch', 'diver' (or in fact 'varid'), and 'year'. |
varid |
the variable in the data.frame for which the count and average catch per year is to be estimated. Defaults to 'diver' ready for abalone data but could be vessel for other fisheries, or any other factor of interest. |
group |
the first grouping variable, typically diver ifor abalone |
catch |
the variable name for the catch, sometimes blip in abalone |
a data.frame made of the input data.frame plus two new columns
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.