-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpf_archive-class.Rd
39 lines (35 loc) · 3.76 KB
/
pf_archive-class.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pf_classes.R
\docType{package}
\name{pf_archive-class}
\alias{pf_archive-class}
\title{"pf_archive" class}
\value{
This object is a named list, with three elements, which records the particles sampled at each time step, the method and the parameters used in the call to \code{\link[flapper]{pf}}:
\describe{
\item{history}{A list of dataframes, one for each time step, that record particle samples. Each dataframe comprises \code{n} rows (one for each particle) and the following five columns:
\itemize{
\item{id_previous.}{ An integer that uniquely defines a previous location on the \code{record} \code{\link[raster]{raster}}s. Following implementation of \code{\link[flapper]{pf}}, this is absent for the first time step. For subsequent time steps, this is \code{NA} if the fast Euclidean distances method has been used, which does not `remember' previous locations, but specified otherwise.) For \code{\link[flapper]{pf_simplify}}, \code{id_previous} is \code{NA} for the fist time step, unless an \code{origin} has been specified; for subsequent time steps, \code{id_previous} is included.}
\item{pr_previous.}{ A double that defines the movement probabilities associated with previous locations. Following implementation of \code{\link[flapper]{pf}}, this is absent for the first time step. For subsequent time steps, this is \code{NA} if the fast Euclidean distances method has been used, which does not `remember' previous locations, but specified otherwise. For \code{\link[flapper]{pf_simplify}} probabilities are included for all time steps.}
\item{id_current.}{ An integer that uniquely defines each location on the \code{record} \code{\link[raster]{raster}}s.}
\item{pr_current.} A double that defines the probability of movement into each cell.
\item{timestep.}{ An integer that defines each time step.}
}
Following implementations of \code{\link[flapper]{pf_simplify}} an additional column is included:
\itemize{
\item{dist_current.} {A double that defines the distance between \code{id_previous} and \code{id_current}.}
}
}
\item{method}{A character that defines whether or not \code{history} was derived directly from \code{\link[flapper]{pf}} (\code{method = "pf"}), in which case \code{history} contains all of the particles sampled at each time step, or via \code{\link[flapper]{pf}} plus \code{\link[flapper]{pf_simplify}} with \code{return = "archive"} (\code{method = "pf_simplify"}), in which case \code{history} contains the subset of particles at each time step that were re-sampled at the next time step; for implementations with \code{summarise_pr = TRUE}, for particles that were sampled multiple times on a given time step, this only one sample with an adjusted probability score that accounts for the number of times that a location was sampled (see \code{\link[flapper]{pf_simplify}}).}
\item{args}{A named list that records the function arguments passed to \code{\link[flapper]{pf}}. This is as inputted to \code{\link[flapper]{pf}}, but with the `calc_distance_graph' elements added if unsupplied and applicable.}
}
}
\description{
An S3 class that defines the object returned by \code{\link[flapper]{pf}} or \code{\link[flapper]{pf}} plus \code{\link[flapper]{pf_simplify}} with the \code{return = "archive"} argument.
}
\seealso{
\code{\link[flapper]{dat_dcpf_histories}} provides an example of a \code{\link[flapper]{pf_archive-class}} object. \code{\link[flapper]{pf}} and \code{\link[flapper]{pf_simplify}} return \code{\link[flapper]{pf_archive-class}} objects. \code{\link[flapper]{pf_simplify}} can also convert \code{\link[flapper]{pf_archive-class}} objects into \code{\link[flapper]{pf_path-class}} objects that comprise the reconstructed movement paths.
}
\author{
Edward Lavender
}