get_counts | R Documentation |
Count birds on each site at each time step from given set of trajectories. The number of flying and dead birds are also computed.
get_counts(migr, traj)
migr |
A migration structure (attributes horizon, initial_state are used). |
traj |
A trajectory matrix N x (horizon+1) with a trajectory for each bird. For each bird, at each time step (from 0 to horizon), state of the bird is specified: site number, 0 for flying, -1 for dead. |
Counts of birds on sites, matrix (S+2) x (horizon+1). At each time step (from 1 to horizon), count of birds in each site. The first column (time step 0) and the two last rows (state flying and dead) are set to NA.
migr <- generate_toy_migration() traj <- generate_trajectories( migr ) get_counts( migr, traj )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.