Enumerates all cells (min-max pairs) in a gfc.flow result, including cells with spurious endpoints (unless excluded). Optionally augments each cell with binary outcome counts over unique cell vertices.
Usage
# S3 method for class 'gfc.flow'
list.cells(
x,
include.spurious = TRUE,
loc.min = NULL,
loc.max = NULL,
include.spurious.flags = FALSE,
y = NULL,
include.max.label = FALSE,
include.min.vertex = FALSE,
include.max.vertex = FALSE,
...
)Arguments
- x
A gfc.flow object from
compute.gfc.flow().- include.spurious
Logical; if TRUE (default), include cells with spurious endpoints.
- loc.min
Optional. If non-NULL, filter to cells with this minimum endpoint. Can be a vertex index (numeric/integer) or a label (character).
- loc.max
Optional. If non-NULL, filter to cells with this maximum endpoint. Can be a vertex index (numeric/integer) or a label (character).
- include.spurious.flags
Logical; if TRUE, include logical columns
min.is.spuriousandmax.is.spuriousin the returned data frame. Default FALSE.- y
Optional. A binary outcome vector of length
x$n.vertices(or length equal to the number of vertices). Must be coded as 0/1 or logical. If provided, adds columns"n(y = 1)","n(y = 0)","ratio","rel.ratio"computed over unique cell vertices.- include.max.label
Logical; if TRUE include
max.labelcolumn. Default FALSE.- include.min.vertex
Logical; if TRUE include
min.vertexcolumn. Default FALSE.- include.max.vertex
Logical; if TRUE include
max.vertexcolumn. Default FALSE.- ...
Extra parameters.
Value
A data frame with (always) columns:
- min.label
Minimum label.
- n.trajectories
Number of trajectories connecting this pair.
- unique.vertices
Number of unique vertices in trajectories.
Optionally includes endpoint columns depending on flags:
- max.label
Maximum label (if
include.max.label = TRUE).- min.vertex
Minimum vertex index (if
include.min.vertex = TRUE).- max.vertex
Maximum vertex index (if
include.max.vertex = TRUE).
If include.spurious.flags = TRUE, also includes:
- min.is.spurious
TRUE if the minimum endpoint is spurious.
- max.is.spurious
TRUE if the maximum endpoint is spurious.
If y is provided, also includes:
- n(y = 1)
Count of outcome==1 among unique cell vertices.
- n(y = 0)
Count of outcome==0 among unique cell vertices.
- ratio
n(y=1) / (n(y=0)+n(y=1)).- rel.ratio
ratio / mean(y)(global prevalence).