fg_get_summary_index: Retrieves the index of the requested summary.

View source: R/01_flowgraph_accessors.R

fg_get_summary_indexR Documentation

Retrieves the index of the requested summary.

Description

Retrieves the index of the requested summary from a given flowGraph object.

Usage

fg_get_summary_index(fg, type = "node", index = NULL, summary_meta = NULL)

Arguments

fg

flowGraph object.

type

A string indicating feature type the summary was created for 'node' or 'edge'.

index

The user must provide type and additionally, one of summary_meta or index.

index is an integer indicating the row in fg_get_summary_desc(<flowGraph>) of the corresponding type and summary the user would like to retrieve.

summary_meta

The user must provide type and additionally, one of summary_meta or index.

summary_meta is a list containing type (feature type: node or edge), feature (feature name), test_name (summary statistic name), class (class), lable1, and label2 (class labels compared). See fg_get_summary_desc for details.

Value

An integer analagous to index. If both index and summary_meta are NULL, returns 1.

See Also

flowGraph-class fg_get_summary_desc fg_add_summary fg_rm_summary fg_plot

Examples


 no_cores <- 1
 data(fg_data_pos30)
 fg <- flowGraph(fg_data_pos30$count, class=fg_data_pos30$meta$class,
                 no_cores=no_cores)

 # set features to NULL to apply summary statistic to all features.
 fg <- fg_summary(fg, no_cores=no_cores, class="class", label1="control",
                  overwrite=FALSE, test_name="t", diminish=FALSE,
                  node_features=NULL, edge_features=NULL)
 show(fg)

 index <- flowGraph:::fg_get_summary_index(
  fg, type="node", summary_meta=list(
    feature="SpecEnr", test_name="t", class="class",
    label1="control", label2="exp"))


aya49/flowGraph documentation built on Feb. 4, 2024, 6:40 p.m.