From 5a6edf65dc628201b67ad68976e7b318435a058c Mon Sep 17 00:00:00 2001 From: schochastics Date: Thu, 27 Feb 2025 15:33:38 +0100 Subject: [PATCH] moved to function instead of \(x) --- R/plot.common.R | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/R/plot.common.R b/R/plot.common.R index f5342fae708..6590ca69937 100644 --- a/R/plot.common.R +++ b/R/plot.common.R @@ -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 + ) + } ) } @@ -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