Skip to content

Commit 3ffe61b

Browse files
Separated documentation for autographr(), autographs(), and autographd() functions
1 parent d5f3883 commit 3ffe61b

8 files changed

+202
-85
lines changed

R/map_autographr.R

+16-8
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,6 @@
7070
#' @importFrom ggraph geom_edge_link geom_node_text geom_conn_bundle
7171
#' get_con geom_node_point scale_edge_width_continuous geom_node_label
7272
#' @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
7773
#' @examples
7874
#' autographr(ison_adolescents)
7975
#' ison_adolescents |>
@@ -126,15 +122,21 @@ autographr <- function(.data, layout, labels = TRUE,
126122
p
127123
}
128124

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
131131
#' @param netlist A list of manynet-compatible networks.
132132
#' @param waves The number of plots to be displayed side-by-side.
133133
#' If missing, the number of plots will be reduced to the first and last
134134
#' when there are more than four plots.
135135
#' @param based_on Whether the layout of the joint plots should
136136
#' be based on the "first" or the "last" network.
137+
#' @param ... Additional arguments passed to `autographr()`.
137138
#' @source http://blog.schochastics.net/post/animating-network-evolutions-with-gganimate/
139+
#' @return Multiple ggplot2::ggplot() objects displayed side-by-side.
138140
#' @examples
139141
#' #autographs(to_egos(ison_adolescents))
140142
#' #autographs(to_egos(ison_adolescents), waves = 8)
@@ -185,20 +187,26 @@ autographs <- function(netlist, waves,
185187
do.call(patchwork::wrap_plots, c(gs, list(guides = "collect")))
186188
}
187189

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
190196
#' @param tlist The same migraph-compatible network listed according to
191197
#' a time attribute, waves, or slices.
192198
#' @param keep_isolates Would you like to remove vertices that do not have
193199
#' any adjacent edges in each frame?
194200
#' TRUE by default.
195201
#' If FALSE, deletes isolated vertices in each frame.
202+
#' @inheritParams autographr
196203
#' @importFrom igraph gsize as_data_frame get.edgelist
197204
#' @importFrom ggplot2 ggplot geom_segment geom_point geom_text
198205
#' scale_alpha_manual theme_void
199206
#' @importFrom ggraph create_layout
200207
#' @importFrom dplyr mutate select distinct left_join %>%
201208
#' @source http://blog.schochastics.net/post/animating-network-evolutions-with-gganimate/
209+
#' @return A gganimate::animate() object.
202210
#' @examples
203211
#' #ison_adolescents %>%
204212
#' # mutate_ties(year = sample(1995:1998, 10, replace = TRUE)) %>%

man/attributes.Rd

+3-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/autographd.Rd

+125
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/autographing.Rd man/autographr.Rd

+3-73
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/autographs.Rd

+46
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/configuration_layouts.Rd

+3-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/partition_layouts.Rd

+3-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/properties.Rd

+3-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)