as.matrix.conceptmaps: Convert a conceptmaps object to a matrix

Description Usage Arguments Value Examples

Description

as.matrix converts a conceptmaps object into a matrix. The output can be fed back into conceptmaps.matrix.

Usage

1
2
## S3 method for class 'conceptmaps'
as.matrix(x, ...)

Arguments

x

A conceptmaps object.

...

-

Value

A matrix with 4 columns and one row for each proposition of one of the concept maps. The 4 columns contain an id of the map (starting from 1) and then the start and end node of each proposition as well as the label of the edge (as character vectors).

Examples

1
2
3
4
5
6
7
8
9
data = rbind(
 cbind("1", "Object", "Class", "is instance of"),
 cbind("1", "Object", "Attribute", "has"),
 cbind("2", "Class", "Attribute", "possesses"),
 cbind("2", "Attribute", "Data-type", "has"),
 cbind("3", "Object", "Class", "is instance of")
 )
 cms = conceptmaps(data)
 as.matrix(cms) 

comato documentation built on May 2, 2019, 6:52 a.m.