Skip to content

Commit

Permalink
fix error when breaks not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
Yunuuuu committed Jan 9, 2025
1 parent 4afcb80 commit d0274bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/layout-heatmap-oncoplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ ggoncoplot.default <- function(data = NULL, mapping = aes(), ...,
value_list <- strsplit(data$value,
split = "\\s*[;:,|]\\s*", perl = TRUE
)
lvls <- ggalign_attr(data, ".__ggalign_oncoplot_breaks__")
lvls <- .subset2(ggalign_attr_get(data), ".__ggalign_oncoplot_breaks__")
data <- vec_rep_each(data, list_sizes(value_list))
value <- unlist(value_list, recursive = FALSE, use.names = FALSE)
if (!is.null(lvls)) value <- factor(value, levels = lvls)
Expand Down

0 comments on commit d0274bf

Please sign in to comment.