zebra | R Documentation |
This function applies alternating background colors (zebra striping) to an
html_matrix
object, either by rows or by columns.
zebra(x, col = c("#FFFFFF", "#CCCCCC"), byrow = TRUE)
x |
An |
col |
A character vector of colors to use for striping. Defaults to
|
byrow |
Logical; if |
An html_matrix
object with updated background colors.
library("magrittr")
m <- matrix(1:12, ncol = 4)
hm <- html_matrix(m) %>% zebra()
html <- toHTML(hm, browser = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.