formattable
formattable copied to clipboard
format_table loses alignment
I built a table using
is <- formattable(x, align=c('l','l','r'))
Trying to output it as HTML using format_table, the alignment parameter is lost because the format_table does not check my is object for align data, it is just a parameter of the function.
A workaround is to explicitly reuse the align format from the parameters.
format_table(is, align=attributes(is)$formattable$format$align)