From e8ff317ba1fc5eaa42ed34c5f05213c026fa7df4 Mon Sep 17 00:00:00 2001 From: yun Date: Wed, 17 Jul 2024 07:53:59 +0800 Subject: [PATCH] fix anno_setup_data.numeric --- R/anno-setup_data.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/R/anno-setup_data.R b/R/anno-setup_data.R index 340b014d..bc8c0020 100644 --- a/R/anno-setup_data.R +++ b/R/anno-setup_data.R @@ -37,10 +37,10 @@ anno_setup_data.numeric <- function(data, position, heatmap_matrix, if (nrow(anno_matrix) != NROW(data)) { cli::cli_abort(msg_anno_incompatible_data(object_name), call = call) } - data <- matrix(data, ncol = 1L) - colnames(data) <- "V1" - if (rlang::is_named(data)) rownames(data) <- names(matrix) - data + ans <- matrix(data, ncol = 1L) + colnames(ans) <- "V1" + if (rlang::is_named(data)) rownames(ans) <- names(data) + ans } #' @export