R/view.R
dtab.data.frame.Rd
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, caption = NULL, envir = parent.frame(), ... )
object | Data.frame to display |
---|---|
vars | Variables to show (default is all) |
filt | Filter to apply to the specified dataset. For example "price > 10000" if dataset is "diamonds" (default is "") |
rows | 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) |
nr | Number of rows of data to include in the table |
na.rm | Remove rows with missing values (default is FALSE) |
dec | Number of decimal places to show. Default is no rounding (NULL) |
perc | Vector of column names to be displayed as a percentage |
filter | Show column filters in DT table. Options are "none", "top", "bottom" |
pageLength | Number of rows to show in table |
dom | Table control elements to show on the page. See https://datatables.net/reference/option/dom |
style | Table formatting style ("bootstrap" or "default") |
rownames | Show data.frame rownames. Default is FALSE |
caption | Table caption |
envir | Environment to extract data from |
... | Additional arguments |
View, search, sort, and filter a data.frame. For styling options see https://rstudio.github.io/DT/functions.html
if (FALSE) { dtab(mtcars) }