insert_latex_color | R Documentation |
Insert latex colors into a matrix
insert_latex_color(
m,
color_cells,
color_rownames = NULL,
color_colnames = NULL
)
m |
matrix of values |
color_cells |
matrix of latex colors for matrix cells |
color_rownames |
vector of latex colors for row names |
color_colnames |
vector of latex colors for column names |
matrix
# A matrix of zeros
m <- matrix(0, nrow = 2, ncol = 2)
# A matrix of NA values the same size as m
latex_colors <- m * NA
# Make the top row red
latex_colors[1,] <- "red"
# Insert colors into m
insert_latex_color(m, latex_colors)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.