#' Color Rows
#'
#' If 'rows' is left as NULL all rows will have the color and bg applied.
#'
#' @param flex flextable
#' @param rows numeric
#'
#' @return flextable
#' @export
#'
#'
color_rows <- function(flex, rows = NULL, bg = "light grey", color = "black") {
flex <- bg(flex, i = rows, bg = bg)
flex <- color(flex, i = rows, color = color)
flex
}
#' Color Header
#'
#' If 'rows' is left as NULL all rows will have the color and bg applied.
#'
#' @param flex flextable
#' @param rows numeric
#'
#' @return flextable
#' @export
#'
#'
color_header <- function(flex, rows = NULL, bg = "#ED7D31", color = "#FFFFFF") {
flex <- bg(flex, i = rows, bg = bg, part = "header")
flex <- color(flex, i = rows, color = color, part = "header")
flex
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.