This function simplifies the output of ac
, dc
and acdc
, by processing information from the 'archive' elements of an acdc_archive-class
object that hold the results of calls to the workhorse routines. This is especially useful if the algorithm(s) have been applied chunk-wise, in which case the results for each chunk are returned in a list. The function aggregates information across chunks to generate a continuous time series of results and a map of the expected proportion of time steps spent in each grid cell.
acdc_simplify(
archive,
type = c("acs", "dc"),
mask = NULL,
normalise = TRUE,
keep_chunks = FALSE
)
An acdc_archive-class
object returned by ac
, dc
or acdc
.
A character that defines whether the function should be implemented for the outputs of a call to an AC* algorithm (ac
or acdc
), in which case type = "acs"
, or the DC algorithm (dc
), in which case type = "dc"
.
(optional) A spatial mask (e.g., the argument passed to bathy
in ac
, dc
or acdc
) to mask areas (e.g., land) from the overall map. If implemented, cells in masked areas are assigned NAs rather than a score of 0.
A logical input that defines whether or not to normalise the overall map so that cell scores sum to one. If normalise = FALSE
, the overall map represents the expected number of time steps spent in each grid cell; if normalise = TRUE
, the overall map represents the expected proportion of time steps spent in each grid cell.
A logical variable that defines whether or not to retain all chunk-specific information.
The function returns an object of class acdc_record-class
.
If the ac
, dc
or acdc
function was implemented step-wise, this function simply extracts the necessary information and re-packages it into an acdc_record-class
object. For a chunk-wise implementation, the function (a) computes the map of where the individual could have spent more or less time by aggregating the chunk-specific maps) and (b) simplifies chunk-specific records into a single contiguous time series, with re-defined time stamps from the start to the end of the time series (for AC* algorithm(s)) to return an acdc_record-class
object.
The AC, DC and ACDC algorithms are implemented by ac
, dc
and acdc
. After simplification, acdc_plot_trace
, acdc_plot_record
and acdc_animate_record
can be implemented to visualise time-specific results.