|
70 | 70 | #' @importFrom ggraph geom_edge_link geom_node_text geom_conn_bundle
|
71 | 71 | #' get_con geom_node_point scale_edge_width_continuous geom_node_label
|
72 | 72 | #' @importFrom ggplot2 aes arrow unit scale_color_brewer scale_fill_brewer
|
73 |
| -#' @name autographing |
74 |
| -NULL |
75 |
| - |
76 |
| -#' @describeIn autographing Graphs a network with sensible defaults |
77 | 73 | #' @examples
|
78 | 74 | #' autographr(ison_adolescents)
|
79 | 75 | #' ison_adolescents |>
|
@@ -126,15 +122,21 @@ autographr <- function(.data, layout, labels = TRUE,
|
126 | 122 | p
|
127 | 123 | }
|
128 | 124 |
|
129 |
| -#' @describeIn autographing Graphs a list of networks |
130 |
| -#' with sensible defaults |
| 125 | +#' Graphs a list of networks with sensible defaults |
| 126 | +#' |
| 127 | +#' @description |
| 128 | +#' The aim of this function is to provide users with a quick and easy |
| 129 | +#' graphing function for lists of networks. |
| 130 | +#' @family mapping |
131 | 131 | #' @param netlist A list of manynet-compatible networks.
|
132 | 132 | #' @param waves The number of plots to be displayed side-by-side.
|
133 | 133 | #' If missing, the number of plots will be reduced to the first and last
|
134 | 134 | #' when there are more than four plots.
|
135 | 135 | #' @param based_on Whether the layout of the joint plots should
|
136 | 136 | #' be based on the "first" or the "last" network.
|
| 137 | +#' @param ... Additional arguments passed to `autographr()`. |
137 | 138 | #' @source http://blog.schochastics.net/post/animating-network-evolutions-with-gganimate/
|
| 139 | +#' @return Multiple ggplot2::ggplot() objects displayed side-by-side. |
138 | 140 | #' @examples
|
139 | 141 | #' #autographs(to_egos(ison_adolescents))
|
140 | 142 | #' #autographs(to_egos(ison_adolescents), waves = 8)
|
@@ -185,20 +187,26 @@ autographs <- function(netlist, waves,
|
185 | 187 | do.call(patchwork::wrap_plots, c(gs, list(guides = "collect")))
|
186 | 188 | }
|
187 | 189 |
|
188 |
| -#' @describeIn autographing Graphs an dynamic (animated) network |
189 |
| -#' with sensible defaults |
| 190 | +#' Graphs an dynamic (animated) network with sensible defaults |
| 191 | +#' |
| 192 | +#' @description |
| 193 | +#' The aim of this function is to provide users with a quick and easy |
| 194 | +#' graphing function to produce animated network visualisations. |
| 195 | +#' @family mapping |
190 | 196 | #' @param tlist The same migraph-compatible network listed according to
|
191 | 197 | #' a time attribute, waves, or slices.
|
192 | 198 | #' @param keep_isolates Would you like to remove vertices that do not have
|
193 | 199 | #' any adjacent edges in each frame?
|
194 | 200 | #' TRUE by default.
|
195 | 201 | #' If FALSE, deletes isolated vertices in each frame.
|
| 202 | +#' @inheritParams autographr |
196 | 203 | #' @importFrom igraph gsize as_data_frame get.edgelist
|
197 | 204 | #' @importFrom ggplot2 ggplot geom_segment geom_point geom_text
|
198 | 205 | #' scale_alpha_manual theme_void
|
199 | 206 | #' @importFrom ggraph create_layout
|
200 | 207 | #' @importFrom dplyr mutate select distinct left_join %>%
|
201 | 208 | #' @source http://blog.schochastics.net/post/animating-network-evolutions-with-gganimate/
|
| 209 | +#' @return A gganimate::animate() object. |
202 | 210 | #' @examples
|
203 | 211 | #' #ison_adolescents %>%
|
204 | 212 | #' # mutate_ties(year = sample(1995:1998, 10, replace = TRUE)) %>%
|
|
0 commit comments