landscape {comato} | R Documentation |
Aggregating the maps of a conceptmaps object into a concept landscape
Description
landscape
transforms a set of concept maps into a concept landscape using one of several possible methods.
Depending on the value of result
and accumulation or amalgamation is performed on the concept map data. The amalgamation
forms a weighted graph based on the unified set of concepts. An accumulation transforms each concept map into a vector and
returns a matrix of these vectors. Using FUN
the process of transformation can be influenced in both cases.
Usage
landscape(maps, result = c("graph", "matrix"), mode, FUN = NULL)
Arguments
maps |
A conceptmaps object. |
result |
Either "graph" or "matrix" defines the return type and the method of aggregation. An amalgamation results in a weighted graph and an accumulation results a matrix. |
mode |
If |
FUN |
If |
Value
Depending on result
either an igraph object or a numeric matrix.
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
cms = conceptmaps(list(conceptmap(g1), conceptmap(g2), conceptmap(g3)))
landscape(cms, result="graph", mode="undirected")
landscape(cms, result="matrix", mode="concept.vector")