Description Usage Arguments Value Examples
Formatting the data for plotting an Social Cognitive Map
1 2 3 4 5 6 7 8 | SocCMap(
data.edges.soc,
project,
label = "num",
minlen = 1,
fontsize = 16,
shape = "box"
)
|
data.edges.soc |
A data.frame as produced by the EdgSocCMap function |
project |
A QDA project, a list as generated by the ProjectCMap function. |
label |
A character string that defines the text that will be print in the variables (vertex) of the cognitive maps. It can be "num", "name" or "numname" (which is of the form "NUM - Name"). The default is "num" |
minlen |
A graphical parameter that defines a relative lenght between the variable of the cognitive maps. See help from RGraphViz package. |
fontsize |
The fontsize of vertices (concepts), in r-base plot |
shape |
The shape of the verices (concepts), in r-base plot |
a 'SocCMap' object, a list containing various information that could be use for plotting an Individual Cognitive Map. The most important elements are :
A list of information on Cognitive Map's variables (i.e. vertices)
A list of information about relationships
##'
A graphNEL object
A list of graphical attributes of edges
A list of graphical attributes of nodes (vertices)
A list of graphical attributes of the whole graph
1 2 3 4 5 6 | 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)
SocCMap(edg.scm, my.project)
|
$vertex
$vertex$num
[1] 1 2 3 4
$vertex$numname
[1] "1 - Concept A" "2 - Concept B" "3 - Concept C" "4 - Concept D"
$vertex$name
[1] "Concept A" "Concept B" "Concept C" "Concept D"
$vertex$label
1 2 3 4
1 2 3 4
$edg
$edg$weight
1~2 1~3 1~4 3~4
17 17 12 6
$edg$name
[1] "1~2" "1~3" "1~4" "3~4"
$graph
A graphNEL graph with directed edges
Number of Nodes = 4
Number of Edges = 4
$eAttrs
$eAttrs$label
1~2 1~3 1~4 3~4
17 17 12 6
$eAttrs$color
$eAttrs$color$`1~2`
[1] "#000000"
$eAttrs$color$`1~3`
[1] "#000000"
$eAttrs$color$`1~4`
[1] "#4B4B4B"
$eAttrs$color$`3~4`
[1] "#A5A5A5"
$nAttrs
$nAttrs$label
1 2 3 4
1 2 3 4
$gAttrs
$gAttrs$graph
$gAttrs$graph$overlap
[1] FALSE
$gAttrs$graph$splines
[1] TRUE
$gAttrs$graph$rankdir
[1] "TB"
$gAttrs$node
$gAttrs$node$fixedsize
[1] FALSE
$gAttrs$node$labelloc
[1] "t"
$gAttrs$node$shape
[1] "box"
$gAttrs$node$fontsize
[1] 16
$gAttrs$node$style
[1] "rounded"
$gAttrs$edge
$gAttrs$edge$minlen
[1] 1
$gAttrs$edge$color
[1] "darkgrey"
$gAttrs$edge$arrowsize
[1] 0.5
$gAttrs$edge$arrowhead
[1] "open"
$gAttrs$edge$arrowtail
[1] "none"
$gAttrs$edge$dir
[1] "forward"
$gAttrs$edge$labelfontsize
[1] 8
$gAttrs$edge$lwd
[1] 1
attr(,"class")
[1] "SocCMap"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.