Skip to contents

Create a faketable table definition

Usage

table_def(...)

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 an NA value.

Value

A table_def() object

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