pf_access_history: Access the 'history' element of a 'pf_archive-class' object

View source: R/pf_access.R

pf_access_historyR Documentation

Access the ‘history’ element of a pf_archive-class object

Description

This function accesses and simplifies the ‘history’ list in a pf_archive-class object.

Usage

pf_access_history(archive, bathy = NULL)

Arguments

archive

A pf_archive-class object.

bathy

(optional) A raster that defines the grid across the area over which particle filtering was applied. If unsupplied, this is extracted from archive if available.

Details

From the ‘history’ element of a pf_archive-class object, this function extracts particle samples as a dataframe with columns for time steps, cell IDs, cell probabilities and coordinates (if bathy is available).

Value

The function returns a dataframe that defines, for each time step (‘timestep’), particle samples (‘cell_id’), associated probabilities (‘cell_pr’) and, if bathy is available, cell coordinates (‘cell_x’, ‘cell_y’ and ‘cell_z’).

Author(s)

Edward Lavender

Examples

pf_access_history(dat_dcpf_histories)

edwardlavender/flapper documentation built on Jan. 22, 2025, 2:44 p.m.