From 2fdecde94f3dbaa14c33ccd19323342c48b93816 Mon Sep 17 00:00:00 2001 From: Ben Parks Date: Wed, 8 Jan 2025 17:16:12 -0800 Subject: [PATCH] Fix copy-paste errors Co-authored-by: Immanuel Abdi <56730419+immanuelazn@users.noreply.github.com> --- r/R/matrix.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/r/R/matrix.R b/r/R/matrix.R index 09d3571a..a1c2b6e5 100644 --- a/r/R/matrix.R +++ b/r/R/matrix.R @@ -1261,8 +1261,8 @@ setMethod("[", "RowBindMatrices", function(x, i, j, ...) { if (!rlang::is_missing(i$subset)) { rows <- vapply(x@matrix_list, nrow, integer(1)) local_i_offset <- cumsum(c(0, rows)) - # Find the range of indices in j$subset that correspond to each matrix in x@matrix_list - local_i_range <- findInterval(cumsum(c(0, rows)), i$subset) + # Find the range of indices in i$subset that correspond to each matrix in x@matrix_list + local_i_range <- findInterval(local_i_offset, i$subset) } new_mats <- list() @@ -1332,7 +1332,7 @@ setMethod("[", "ColBindMatrices", function(x, i, j, ...) { cols <- vapply(x@matrix_list, ncol, integer(1)) local_j_offset <- cumsum(c(0, cols)) # Find the range of indices in j$subset that correspond to each matrix in x@matrix_list - local_j_range <- findInterval(cumsum(c(0, cols)), j$subset) + local_j_range <- findInterval(local_j_offset, j$subset) } new_mats <- list()