View source: R/02_flowgraph_features.R
fg_feat_node_specenr | R Documentation |
Generates the SpecEnr node feature and returns it inside the returned flowGraph object.
fg_feat_node_specenr(fg, no_cores = 1, feature = "prop", overwrite = FALSE)
fg |
flowGraph object |
no_cores |
An integer indicating how many cores to parallelize on. |
feature |
A string indicating feature name; this is the feature SpecEnr will be calculated on. |
overwrite |
A logical variable indicating whether to overwrite the existing SpecEnr node feature if it exists. |
Given a flowGraph object, fg_feat_node_specenr
returns the same
flowGraph object with an additional SpecEnr
and expect_prop
node
feature and its meta data.
The expected proportions feature is made using the prop
node
and edge
features; therefore, the returned flowGraph will also
contain these two features. For details on how these feature is calculated.
flowGraph object containing the SpecEnr node feature.
yue2019identifyingflowGraph
flowGraph-class
fg_feat_node_prop
fg_add_feature
fg_get_feature
fg_rm_feature
fg_get_feature_desc
no_cores <- 1
data(fg_data_pos30)
fg <- flowGraph(fg_data_pos30$count, class=fg_data_pos30$meta$class,
prop=FALSE, specenr=FALSE,
no_cores=no_cores)
# SpecEnr is by default calculated based on proportions
fg <- fg_feat_node_specenr(fg, no_cores=no_cores)
# SpecEnr can be calculated for other feature values too
fg <- fg_feat_node_specenr(fg, feature="count")
show(fg)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.