extract_counts | R Documentation |
Loops through unique values of 'occasion' and 'site' in a data.frame in order to extract the matrix of observed counts required for GAI model fitting
extract_counts(data_frame, checks = T, returnDF = T)
data_frame |
A data.frame with columns "site", "occasion" and "counts" |
checks |
if TRUE, checks that all counts are specified |
returnDF |
if TRUE returns instead a list with the matrix of counts as well as a reordered version of the data.frame so that the rows match the matrix output. |
A matrix of counts, with rows as sites and columns as occasions.
extract_counts(example_data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.