I am trying to add a black border to a formattable object.
Here is my example table:
df <- data.frame(A = "SSF", B = 100, C = 75, Diff = 100 - 75)
formattable(df, align = c("l", "c", "c", "r"))
Actual output:
You can specify the style in the table.attr
argument inside the formattable
function.
formattable(df, align = c("l", "c", "c", "r"),
table.attr = 'style="border: 7px solid black;";\"')