Define column widths for attributes in a reactable table
colDef_colWidth_robust.Rd
This function allows you to define column widths for different attributes in a reactable table.
Arguments
- cols
A character vector specifying the attributes for which column widths are defined.
- minWidth
Minimum width for the columns. Default is NA.
- maxWidth
Maximum width for the columns. Default is NA.
- width
Width for the columns. Default is NA.
- wrap
Logical indicating whether to wrap text in the columns. Default is FALSE.
Examples
rownames_to_column("cars") %>%
reactable(
defaultColDef = colDef(footerStyle = list(fontWeight = "bold")),
groupBy = "cars",
columns = combined_named_lists(
colDef_colWidth_robust(cols = c("cars", "mpg"), minWidth = 400)
# ,colDef_hide(cols = c("vs", "am", "gear", "carb", "wt"))
)
)
#> Error in rownames_to_column("cars"): is.data.frame(df) is not TRUE