Skip to content

Commit

Permalink
fix anno_setup_data.numeric
Browse files Browse the repository at this point in the history
  • Loading branch information
Yunuuuu committed Jul 16, 2024
1 parent 66fac88 commit e8ff317
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/anno-setup_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e8ff317

Please sign in to comment.