dtab.data.frame {radiant.data} | R Documentation |
Create an interactive table to view, search, sort, and filter data
Description
Create an interactive table to view, search, sort, and filter data
Usage
## S3 method for class 'data.frame'
dtab(
object,
vars = "",
filt = "",
arr = "",
rows = NULL,
nr = NULL,
na.rm = FALSE,
dec = 3,
perc = "",
filter = "top",
pageLength = 10,
dom = "",
style = "bootstrap4",
rownames = FALSE,
caption = NULL,
envir = parent.frame(),
...
)
Arguments
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 "") |
arr |
Expression to arrange (sort) the data on (e.g., "color, desc(price)") |
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. This function will be mainly used in reports so it is best to keep this number small |
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 |
Details
View, search, sort, and filter a data.frame. For styling options see https://rstudio.github.io/DT/functions.html
Examples
## Not run:
dtab(mtcars)
## End(Not run)