truncate_birdflow() Eliminates marginals and/or transitions from a BirdFlow
model and adjusts other aspects of the model so that it only covers part of a
year. The intent is to reduce object size and processing time when only part
of the year is of interest.
Arguments
- bf
A BirdFlow object.
- ...
Arguments passed on to
lookup_timestep_sequenceseasona season name, season alias, or "all". See
lookup_season_timesteps()for options.startThe starting point in time specified as a timestep, character date, or date object.
endThe ending point in time as a date or timestep.
directionEither "forward" or "backward" defaults to
"forward"if not processing dates. If using date inputdirectionis optional and is only used to verify the direction implicit in the dates.season_bufferOnly used with
seasoninput.season_bufferis passed tolookup_season_timesteps()and defaults to 1; it is the number of timesteps to extend the season by at each end.n_stepsAlternative to
endThe end will ben_stepsaway fromstartindirection; and the resulting sequence will haven_steptransitions andn_steps + 1timesteps.
Value
A BirdFlow model that only contains information about transitions
for a subset of the year as specified by ....
Details
The model timesteps will always be numbered from 1 to n_timesteps() and so
likely will not be consistent with weeks of the year with the truncated
model.
Currently it's possible to truncate both a fitted model and a model produced
by preprocess_species() but I have yet to create a way to export a
preprocessed model after truncating it (independently of
preprocess_species()) or to truncate during preprocessing. So currently
the utility is limited to reducing the size of fitted models.
It's possible to truncate a model over the year boundary but routes generated from such a model will not plot correctly so it's not recommended; see issue #120.
