make_intersection_brainGraph {brainGraph} | R Documentation |
Create the intersection of graphs based on a logical condition
Description
Returns a graph object with vertices that meet certain criteria. By default, only vertices that meet these criteria for all input graphs will be retained.
Usage
make_intersection_brainGraph(..., subgraph, keep.all.vertices = FALSE)
Arguments
... |
Graph objects or lists of graph objects |
subgraph |
Character string specifying an equation (logical condition) for the vertices to subset |
keep.all.vertices |
Logical indicating whether to keep all vertices that
meet the criteria in at least 1 input graph. Default: |
Details
If no vertices meet criteria for all input graphs, then an igraph
graph object with 0 vertices is returned. If keep.all.vertices=TRUE
,
this is essentially performing a union of vertex sets that meet the
criteria. In any case, the return graph will have 0 edges.
Value
An igraph
graph object
Author(s)
Christopher G. Watson, cgwatson@bu.edu
Examples
## Not run:
res.mtpc <- mtpc(g, covars, ...)
g.mtpc <- make_glm_brainGraph(res.mtpc, atlas)
## All vertices with a significant MTPC result for all contrasts:
g.mtpc.int <- make_intersection_brainGraph(g.mtpc, subgraph='sig == 1')
## Return graphs with vertices with degree > 0 for each group separately
tapply(g.list, groups(g.list), make_intersection_brainGraph,
subgraph='degree > 0')
## End(Not run)
[Package brainGraph version 3.1.0 Index]