View source: R/01_flowgraph_accessors.R
fg_get_feature_means | R Documentation |
Retrieves a feature summary (e.g. colMeans
) for samples
specified by sample id's id
OR class label
label
for class class
given a feature specified
by type
and feat
.
fg_get_feature_means(
fg,
type = c("node", "edge"),
feature = "count",
class = NULL,
label = NULL,
id = NULL,
summary_fun = colMeans
)
fg |
flowGraph object. |
type |
A string indicating feature type the summary was created for 'node' or 'edge'. |
feature |
A string indicating feature name the summary was created for; |
class |
A string corresponding to a column name of the |
label |
A string indicating a class label. |
id |
A string vector containing the sample id's corresponding to the
|
summary_fun |
A function that takes in a matrix and outputs a vector the same length as the number of columns this matrix has. |
A list containing two numeric vectors calculated using the
summary_fun
function on the subset of samples specified by
sample id's id
OR class label
label
for class class
from a feature matrix
specified by type
and feat
.
flowGraph-class
fg_get_summary_desc
fg_add_summary
fg_rm_summary
fg_get_summary
no_cores <- 1
data(fg_data_pos30)
fg <- flowGraph(fg_data_pos30$count, class=fg_data_pos30$meta$class,
no_cores=no_cores)
fg <- fg_summary(fg, no_cores=no_cores, class="class", label1="control",
overwrite=FALSE, test_name="t", diminish=FALSE)
show(fg)
feat_mean <- fg_get_feature_means(fg, type="node", feature="count",
class="class", label="control")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.