From 28b0ed38978190dfc459d167ffa5b484fb9eb001 Mon Sep 17 00:00:00 2001 From: Guangchuang Yu Date: Sat, 17 Aug 2024 21:57:59 +0800 Subject: [PATCH] update --- R/concat.r | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/concat.r b/R/concat.r index 36cc796..4cf6173 100644 --- a/R/concat.r +++ b/R/concat.r @@ -25,7 +25,7 @@ c2 <- function(x, y) { x$vector_list <- c(x$vector_list, list(y)) - x$idx <- c(x$idx, x$idx[length(x$idx)] + x$last_size) + x$idx <- c(x$idx, length(x)) x$last_size <- length(y) return(x) @@ -57,7 +57,7 @@ length.chunked_array <- function(x) { pos <- i - x$idx[j] - sapply(seq_along(pos), function(k) { + sapply(seq_along(i), function(k) { x$vector_list[[j[k]]][pos[k]] }) }