pathfinder.igraph {comato} | R Documentation |
Creating a Pathfinder network from an igraph object
Description
pathfinder
creates the Pathfinder network from a weighted graph based on pathfinder.matrix
. It is a convenience method that can be called
on the result of a call to landscape
Usage
## S3 method for class 'igraph'
pathfinder(data, q = 2, r = 1, threshold = 0,
prune.edges = F, filename = "", ...)
Arguments
data |
An igraph object. |
q |
The parameter q used in the Pathfinder algorithm. The resulting graph will be q-triangular. |
r |
The parameter r used in the Pathfinder algorithm for the r-metric. |
threshold |
A numeric value used for pruning the graph before the Pathfinder algorithm. The pruning works in conjunction with
the value of |
prune.edges |
If TRUE, each entry of the weight matrix that is lower than |
filename |
Optional. If specified, the resulting Pathfinder network will be stored in TGF format in the given file. |
... |
- |
Value
An igraph object that represents the Pathfinder network as a weighted graph.
Examples
#Create concept maps from three random graphs
require("igraph")
g1 = set.vertex.attribute(erdos.renyi.game(5, 0.7, type="gnp"), "name", value=1:5)
g2 = set.vertex.attribute(erdos.renyi.game(5, 0.7, type="gnp"), "name", value=1:5)
g3 = set.vertex.attribute(erdos.renyi.game(5, 0.7, type="gnp"), "name", value=1:5)
#Create conceptmaps object from three conceptmap objects
simple_cms = conceptmaps(list(conceptmap(g1), conceptmap(g2), conceptmap(g3)))
pathfinder(landscape(simple_cms, result="graph", mode="undirected"))