| sprinkle_bg_pattern {pixiedust} | R Documentation | 
Row and Column Background Striping
Description
Provides background color striping based on row or column. Striping may be done with any number of colors. The most common use of striping is to provide row discrimination in tables.
Usage
sprinkle_bg_pattern(
  x,
  rows = NULL,
  cols = NULL,
  bg_pattern = c("transparent", "#DCDCDC"),
  bg_pattern_by = c("rows", "cols"),
  ...,
  part = c("body", "head", "foot", "interoot", "table")
)
## Default S3 method:
sprinkle_bg_pattern(
  x,
  rows = NULL,
  cols = NULL,
  bg_pattern = c("transparent", "#DCDCDC"),
  bg_pattern_by = c("rows", "cols"),
  ...,
  part = c("body", "head", "foot", "interfoot", "table")
)
## S3 method for class 'dust_list'
sprinkle_bg_pattern(
  x,
  rows = NULL,
  cols = NULL,
  bg_pattern = c("transparent", "#DCDCDC"),
  bg_pattern_by = c("rows", "cols"),
  ...,
  part = c("body", "head", "foot", "interfoot", "table")
)
Arguments
| x | An object of class  | 
| rows | Either a numeric vector of rows in the tabular object to be 
modified or an object of class  | 
| cols | Either a numeric vector of columns in the tabular object to be modified, or a character vector of column names. A mixture of character and numeric indices is permissible. | 
| bg_pattern | A character vector giving the colors to be iterated in the pattern. | 
| bg_pattern_by | A subset of  | 
| ... | Additional arguments to pass to other methods. Currently ignored. | 
| part | A character string denoting which part of the table to modify. | 
Functional Requirements
- Correctly reassigns the appropriate elements - bgcolumn in the table part.
- Casts an error if - xis not a- dustobject.
- Casts an error if - bg_patternis not a character vector.
- Casts an error if any element in - bg_patternis not a valid color name.
- Casts an error if - bg_pattern_byis not a subset of- c("rows", "columns")(with partial matching).
- Casts an error if - partis not one of- "body",- "head",- "foot", or- "interfoot"
This is a rare sprinkle that doesn't use the fixed and recycle
arguments.  They are assumed to be FALSE and "none", 
respectively, in order to pass through index_to_sprinkle.
See Also
sprinkle_bg, sprinkle, 
index_to_sprinkle