Create a faketable
table definition
Arguments
- ...
At least one
col_def()
object. Only columns with a definition will be displayed. If a column does not have a definition and rows are added, any column without a definition will receive anNA
value.
Examples
# to create a table_def to display mtcars$mpg
# see faketables::col_def() for more information
table_def(
col_def(
name = 'mpg',
input = input_call(
fun = shiny::textInput,
args = list(label = NULL, placeholder = 'mpg')
),
cast = as.numeric,
width = 3,
display_name = 'MPG'
)
)
#> # A tibble: 1 × 5
#> name input_call cast width display_name
#> * <chr> <list> <list> <dbl> <chr>
#> 1 mpg <function> <fn> 3 MPG