From 1729616d1c1eafc321709daf65150e54516aa52a Mon Sep 17 00:00:00 2001 From: chunxuan-hs <132476141+chunxuan-hs@users.noreply.github.com> Date: Fri, 5 Apr 2024 19:59:18 +0200 Subject: [PATCH] fix: dXX not returning Clonal.count.prop .data is a vector. --- R/diversity.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/diversity.R b/R/diversity.R index 0fd027b1..5a9c9ef9 100644 --- a/R/diversity.R +++ b/R/diversity.R @@ -337,7 +337,7 @@ dXX <- function(.data, .perc = 10) { n <- n + 1 prop <- prop + col[n] } - res <- c(Clones = n, Percentage = 100 * signif((prop / col.sum), 3), Clonal.count.prop = n / nrow(.data)) + res <- c(Clones = n, Percentage = 100 * signif((prop / col.sum), 3), Clonal.count.prop = n / length(.data)) add_class(res, "immunr_dxx") }