Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions R/plot.common.R
Original file line number Diff line number Diff line change
Expand Up @@ -556,11 +556,18 @@ i.get.arrow.mode <- function(graph, arrow.mode = NULL) {
}

if (is.character(arrow.mode)) {
tmp <- numeric(length(arrow.mode))
tmp[arrow.mode %in% c("<", "<-")] <- 1
tmp[arrow.mode %in% c(">", "->")] <- 2
tmp[arrow.mode %in% c("<>", "<->")] <- 3
arrow.mode <- tmp
arrow.mode <- map_dbl(
arrow.mode,
\(x) switch(
x,
"<" = 1,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this might be the first time I find vertical alignment useful 😸

"<-" = 1,
">" = 2,
"->" = 2,
"<>" = 3,
"<->" = 3
)
)
}

if (is.null(arrow.mode)) {
Expand Down