/
figures_for_mmd.R
44 lines (37 loc) · 1.14 KB
/
figures_for_mmd.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#--------------------------------------------------
## Generate Images
#--------------------------------------------------
# Libraries
library(DiagrammeR)
#--------------------------------------------------
#--------------------------------------------------
# Chapter 1
#--------------------------------------------------
grViz("
digraph boxes_and_circles {
# a 'graph' statement
graph [overlap = true, fontsize = 10]
# several 'node' statements
node [shape = box,
fontname = Helvetica]
Individual ; Musical ; Cognitive ; Environmental ; Structural ; Experimental
node [shape = box] // sets as circles
WMC; Gf; CowanList; Musical_Training; Aural_Training;
Interval_Structure; Times_Played; Tempo; AuralSkills
# several 'edge' statements
AuralSkills -> Individual
AuralSkills -> Musical
Individual -> Cognitive
Individual -> Environmental
Musical -> Structural
Musical -> Experimental
Cognitive -> WMC
Cognitive -> Gf
Cognitive -> CowanList
Environmental -> Musical_Training
Environmental -> Aural_Training
Structural -> Interval_Structure
Experimental -> Times_Played
Experimental -> Tempo
}
")