coordCMap: Coordinates of the vertices of a Cognitive Map

Description Usage Arguments Value Examples

Description

Get the coordinates of the vertices of a Cognitive Map. The output of this function can be useful for plotting Cognitive Maps in a personalize ways (as with ggplot2 as done by the ggCMap function of this package)

Usage

1
coordCMap(soc.cmap, layoutType = "neato")

Arguments

soc.cmap

An object of class SocCMap, as an output of the SocCMap function

layoutType

Type of graph. See detail in RGraphViz. Can be 'neato', 'dot', 'twopi', 'circo', and 'fdp'. The default is 'neato'.

Value

A data frame with three variable :

$vertex

The number of the vertex)

$x

The x coordinate of the vertex

$y

The y coordinate of the vertex

Examples

1
2
3
4
5
6
7
8
project_name <- "a_new_project"
main_path <- paste0(system.file("testdata", package = "cogmapr"), '/')
my.project <- ProjectCMap(main_path, project_name)

edg.scm <- EdgSocCMap(my.project, min.weight=6, weighted.icm=TRUE)

scm <- SocCMap(edg.scm, my.project, label = "name", shape = "plaintext")
coordCMap(scm)

cogmapr documentation built on Jan. 4, 2022, 5:06 p.m.