Skip to content

Commit

Permalink
avoid dplyr
Browse files Browse the repository at this point in the history
  • Loading branch information
elong0527 committed Dec 2, 2023
1 parent a34da09 commit 3cca757
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/reactable2.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "|")

Expand Down

0 comments on commit 3cca757

Please sign in to comment.