55
55
# ' Group variables should have a minimum of 3 nodes,
56
56
# ' if less, number groups will be reduced by
57
57
# ' merging categories with lower counts into one called "other".
58
- # ' @param edge_color Edge variable to be used for coloring the nodes.
58
+ # ' @param edge_color Tie variable to be used for coloring the nodes.
59
59
# ' It is easiest if this is added as an edge or tie attribute
60
60
# ' to the graph before plotting.
61
61
# ' Edges can also be colored by declaring a color instead.
62
- # ' @param edge_size Edge variable to be used for sizing the edges.
62
+ # ' @param edge_size Tie variable to be used for sizing the edges.
63
63
# ' This can be any continuous variable on the nodes of the network.
64
64
# ' Since this function expects this to be an existing variable,
65
65
# ' it is recommended to calculate all edge-related statistics prior
@@ -938,7 +938,7 @@ map_dynamic <- function(edges_out, nodes_out, edge_color, node_shape,
938
938
if (! is.null(edge_color )) {
939
939
# Remove NAs in edge color, if declared
940
940
if (edge_color %in% names(edges_out )) {
941
- edge_color <- check_color(edges_out [[edge_color ]])
941
+ edge_color <- . check_color(edges_out [[edge_color ]])
942
942
}
943
943
} else edge_color <- " black"
944
944
if (! is.null(edge_size )) {
@@ -962,7 +962,7 @@ map_dynamic <- function(edges_out, nodes_out, edge_color, node_shape,
962
962
} else node_shape <- " circle"
963
963
if (! is.null(node_color )) {
964
964
if (node_color %in% names(nodes_out )) {
965
- node_color <- check_color(nodes_out [[node_color ]])
965
+ node_color <- . check_color(nodes_out [[node_color ]])
966
966
}
967
967
} else if (is.null(node_color ) & " Infected" %in% names(nodes_out )) {
968
968
node_color <- as.factor(ifelse(nodes_out [[" Exposed" ]], " Exposed" ,
@@ -1003,7 +1003,7 @@ map_dynamic <- function(edges_out, nodes_out, edge_color, node_shape,
1003
1003
p
1004
1004
}
1005
1005
1006
- check_color <- function (v ) {
1006
+ . check_color <- function (v ) {
1007
1007
color <- grDevices :: colors()
1008
1008
color <- color [! color %in% " black" ]
1009
1009
v <- ifelse(is.na(v ), " black" , v )
0 commit comments