Skip to content

Commit

Permalink
Fix #296
Browse files Browse the repository at this point in the history
  • Loading branch information
olivroy committed Dec 8, 2023
1 parent a823d0d commit 745bd52
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 14 deletions.
4 changes: 2 additions & 2 deletions R/create_edge_df.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
#'
#' An arbitrary number of additional columns containing aesthetic or data
#' attributes can be part of the edf, so long as they follow the aforementioned
#' columns.
#' columns. Some examples are included in [edge_aes()]
#'
#' @param from A vector of node ID values from which edges are outbound. The
#' vector length must equal that of the `to` vector.
#' @param to A vector of node ID values to which edges are incoming. The vector
#' length must equal that of the `from` vector.
#' @param rel An optional `rel` label for each edge.
#' @param ... One or more vectors for associated edge attributes.
#' @param ... One or more vectors for associated edge attributes. Can be some of [edge_aes()]
#'
#' @return An edge data frame (edf).
#'
Expand Down
7 changes: 3 additions & 4 deletions R/create_node_df.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@
#' - `label` (of type `character`)
#'
#' An arbitrary number of additional columns containing aesthetic or data
#' attributes can be part of the ndf, so long as they follow the aforementioned
#' attributes can be part of the ndf, see [node_aes()] for additional attributes that can be used with ..., so long as they follow the aforementioned
#' columns.
#'
#' @param n The total number of nodes to include in the node data frame.
#' @param type An optional `type` for each node.
#' @param label An optional `label` for each node.
#' @param ... One or more vectors for associated node attributes.
#'
#' @param ... Additional attributes. Some are present in [node_aes()]
#' @return A node data frame (ndf).
#'
#' @examples
Expand Down Expand Up @@ -67,7 +66,7 @@ create_node_df <- function(
) {

check_number_whole(n)

# FIXME, nothing stopping ae
type <- type %||% rep(NA_character_, n)

# Expand vectors with single values to fill to
Expand Down
2 changes: 1 addition & 1 deletion R/set_edge_attrs.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#' or more edges.
#'
#' @inheritParams render_graph
#' @param edge_attr The name of the attribute to set.
#' @param edge_attr The name of the attribute to set. Some examples are located in [edge_aes()]
#' @param values The values to be set for the chosen attribute for the chosen
#' edges.
#' @param from An optional vector of node IDs from which the edge is outgoing
Expand Down
2 changes: 1 addition & 1 deletion R/set_node_attrs.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#' or more nodes.
#'
#' @inheritParams render_graph
#' @param node_attr The name of the attribute to set.
#' @param node_attr The name of the attribute to set. Examples of attributes can be found in [node_aes()].
#' @param values The values to be set for the chosen attribute for the chosen
#' nodes.
#' @param nodes An optional vector of node IDs for filtering the list of nodes
Expand Down
4 changes: 2 additions & 2 deletions man/create_edge_df.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/create_node_df.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/set_edge_attrs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/set_node_attrs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 745bd52

Please sign in to comment.