Reputation: 113
I have a table look like this:
dt <- data.frame(name = c("A","B","C"),
color = c("#D2B48C","#D3D3D3","#CD853F"))
How could I show each background color at column dt$color
?
Upvotes: 0
Views: 570
Reputation: 3597
You can try with show_col
function of scales
package
DF <- data.frame(name = c("A","B","C"),
color = c("#D2B48C","#D3D3D3","#CD853F"))
library(scales)
scales::show_col(DF$color)
Upvotes: 2