Skip to content

Commit

Permalink
fix: use function instead of \(x) in arrow.mode (#1722)
Browse files Browse the repository at this point in the history
  • Loading branch information
schochastics authored Feb 27, 2025
1 parent b23e7e1 commit 6663aec
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions R/plot.common.R
Original file line number Diff line number Diff line change
Expand Up @@ -558,15 +558,16 @@ i.get.arrow.mode <- function(graph, arrow.mode = NULL) {
if (is.character(arrow.mode)) {
arrow.mode <- map_dbl(
arrow.mode,
\(x) switch(
x,
"<" = 1,
"<-" = 1,
">" = 2,
"->" = 2,
"<>" = 3,
"<->" = 3
)
function(x) {
switch(x,
"<" = 1,
"<-" = 1,
">" = 2,
"->" = 2,
"<>" = 3,
"<->" = 3
)
}
)
}

Expand Down Expand Up @@ -1450,12 +1451,14 @@ i.default.values[["plot"]] <- i.plot.default
#' @examples
#'
#' g <- make_ring(10)
#' values <- lapply(1:10, function(x) sample(1:10,3))
#' values <- lapply(1:10, function(x) sample(1:10, 3))
#'
#' @examplesIf interactive()
#' plot(g, vertex.shape = "pie", vertex.pie = values,
#' vertex.pie.color = list(heat.colors(5)),
#' vertex.size = seq(10, 30, length.out = 10), vertex.label = NA)
#' plot(g,
#' vertex.shape = "pie", vertex.pie = values,
#' vertex.pie.color = list(heat.colors(5)),
#' vertex.size = seq(10, 30, length.out = 10), vertex.label = NA
#' )
#' @rdname vertex.shape.pie
#' @name vertex.shape.pie
NULL

0 comments on commit 6663aec

Please sign in to comment.