Skip to contents

table facade to easily switch implementations

Usage

table_facade(df, caption, digits = getOption("digits"), kable = TRUE)

Arguments

df

data.frame to display

caption

table caption

digits

number of digits (default from options)

kable

if TRUE use knitr::kable

Value

The requested plot, table, or transformed object.

Examples

table_facade(head(iris, 3), caption = "Iris preview")
#> 
#> 
#> Table: Iris preview
#> 
#> | Sepal.Length| Sepal.Width| Petal.Length| Petal.Width|Species |
#> |------------:|-----------:|------------:|-----------:|:-------|
#> |          5.1|         3.5|          1.4|         0.2|setosa  |
#> |          4.9|         3.0|          1.4|         0.2|setosa  |
#> |          4.7|         3.2|          1.3|         0.2|setosa  |