R interface to javascript ag-grid
You can choose to install the development version of aggrid
from GitHub:
devtools::install_github("Liripo/aggrid")
library(aggrid)
aggrid(iris)
aggrid(iris,pagination = TRUE)
aggrid(iris,checkboxSelection = TRUE)
For big data, e.g. millions of rows,you should use server
model.
purrr::map_dfr(seq_len(10000), ~iris) |>
aggrid()
Although the above code can be used to render within 5~6s, operations such as sorting become slowly. So we best to use server
model, it only work in shiny.
library(shiny)
ui <- fluidPage(
aggridOutput("test")
)
server <- function(input, output, session) {
output$test <- renderAggrid({
purrr::map_dfr(seq_len(10000), ~iris) |>
aggrid(server = T)
})
observe({
print(input$test_rows_selected)
})
}
shinyApp(ui, server)
aggrid
has a dependency on ag-grid v30.0.3 which provides community and enterprise options. We've bundled both the versions in this package. Please review the licensing options and terms before you use this software. (https://www.ag-grid.com/license-pricing/)