grid_filters | R Documentation |
Set filters options
grid_filters(
grid,
columns,
showApplyBtn = NULL,
showClearBtn = NULL,
operator = NULL,
format = "yyyy-MM-dd",
type = "auto"
)
grid |
A table created with |
columns |
Name(s) of column in the data used in |
showApplyBtn |
Apply filters only when button is pressed. |
showClearBtn |
Reset the filter that has already been applied. |
operator |
Multi-option filter, the operator used against multiple rules : |
format |
Date format. |
type |
Type of filter : |
A datagrid
htmlwidget.
library(toastui)
data <- data.frame(
number = 1:12,
month.abb = month.abb,
month.name = month.name,
date = Sys.Date() + 0:11,
stringsAsFactors = FALSE
)
datagrid(data) %>%
grid_filters(
columns = "month.abb",
showApplyBtn = TRUE,
showClearBtn = TRUE,
type = "text"
) %>%
grid_filters(
columns = "month.name",
type = "select"
) %>%
grid_filters(columns = "date") %>%
grid_filters(columns = "number")
# Filter all variables
datagrid(rolling_stones_500) %>%
grid_filters(columns = names(rolling_stones_500))
# or
datagrid(rolling_stones_500, filters = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.