Create an interactive table to view, search, sort, and filter data
# S3 method for data.frame
dtab(object, vars = "", filt = "", rows = NULL,
nr = NULL, na.rm = FALSE, dec = 3, perc = "", filter = "top",
pageLength = 10, dom = "", style = "bootstrap", rownames = FALSE,
...)
Data.frame to display
Variables to show (default is all)
Filter to apply to the specified dataset. For example "price > 10000" if dataset is "diamonds" (default is "")
Select rows in the specified dataset. For example "1:10" for the first 10 rows or "n()-10:n()" for the last 10 rows (default is NULL)
Number of rows of data to include in the table
Remove rows with missing values (default is FALSE)
Number of decimal places to show. Default is no rounding (NULL)
Vector of column names to be displayed as a percentage
Show column filters in DT table. Options are "none", "top", "bottom"
Number of rows to show in table
Table control elements to show on the page. See https://datatables.net/reference/option/dom
Table formatting style ("bootstrap" or "default")
Show data.frame rownames. Default is FALSE
Additional arguments
View, search, sort, and filter a data.frame. For styling options see http://rstudio.github.io/DT/functions.html
# NOT RUN {
dtab(mtcars)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab