From 3cca757c543a580437a3801875b06a1c6de1e9e2 Mon Sep 17 00:00:00 2001 From: yilong zhang Date: Sat, 2 Dec 2023 20:48:19 +0000 Subject: [PATCH] avoid dplyr --- R/reactable2.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/reactable2.R b/R/reactable2.R index 52ce7b9..c569cf8 100644 --- a/R/reactable2.R +++ b/R/reactable2.R @@ -78,14 +78,14 @@ reactable_to_df <- function(x){ for(i in seq_along(columns)){ if(! columns[[i]]$id %in% ".details"){ if(is.null(columns[[i]]$show)){ - tbl2[[i]] <- unlist(columns[[i]]) + tbl2[[i]] <- unlist(columns[[i]][c("id", "name")]) } } } - tbl2 <- dplyr::bind_rows(tbl2) + tbl2 <- data.frame(do.call(rbind, tbl2)) # output - tbl <- data.frame(tbl1[, tbl2$id]) + tbl <- data.frame(tbl1[, tbl2[["id"]]]) attr(tbl, "column_header") <- paste(tbl2$name, collapse = "|")