Hello!
I've been using the formattable package to further configure table outputs on a R Notebook, helping audiences on better understanding the data.
To improve reading of the information I need to give more context on the column names which often times means bigger headers, would it be possible to eithher define a column width or to wrap the column headers do they don't take too much space?
Here is a reproductible example, I'd like to be able to wrap the last two columns if possible:
library(tidyverse)
library(formattable)
d <- diamonds %>%
group_by(cut) %>%
summarise(mean_diamond_price = mean(price, na.rm = T),
mean_diamond_depth = mean(depth, na.rm = T),
mean_diamond_carat = mean(carat, na.rm = T),
mean_width_diamond_widest_point = mean(table, na.rm = T))
formattable(d, list(
mean_diamond_price = color_tile("transparent", "pink"),
mean_diamond_depth = color_tile("transparent", "pink"),
mean_diamond_carat = color_tile("transparent", "pink"),
mean_width_diamond_widest_point = color_tile("transparent", "pink")
))