R: Make a data.frame named "cellcolor" from ztable call

make.cell.color {ztable} | R Documentation

## Make a data.frame named "cellcolor" from ztable call

### Description

Make a data.frame named "cellcolor" from ztable call

### Usage

    make.cell.color(x, zebra, zebra.color, zebra.type, zebra.list, zebra.colnames,
      zebra.rownames)

### Arguments

`x` | a data.frame
`zebra` | Null or an integer of 0 or 1 or 2. The arguments zebra and zebra.color are used to make a Zebra striping table(table with alternating background colors) easily. A value of 1 sets background color of all odd rows/columns with specified with zebra.color. A value of 2 sets all even rows/columns. A value of 0 sets background colors of all rows/columns with colors specified with zebra.color. When zebra is 1 or 2, the parameters of prefix.rows and commands ignored. Default is NULL.
`zebra.color` | A color name or a numeric value indicating pre-defined color. When parameter zebra is 0 or 1 or 2 and zebra.color is NULL, then zebra.color is set to "platinum". Numeric values between 1 to 13 is converted to predefined color names. The predefined color names are c("peach","peach-orange", "peachpuff","peach-yellow","pear","pearl","peridot","periwinkle","pastelred", "pastelgray"). Default is NULL.
`zebra.type` | An integer of 0 or 1 or 2 or 3. A value of 1 sets background colors by row. A value of 2 sets background colors by column. A value of 0 sets background colors of all cells. A value of 3 sets background colors of cells specified with zebra.list. Default value is 1.
`zebra.list` | A list consists of y,x,color. zebra.list is used only when zebra.type=3. zebra.list sets the cells specified with rows of vector "y" and columns of vector "x" with "color". The y and x are integer vector indicating rows and columns. NA value of y or x indicating all columns or rows. The color is an character vector consists of names of color.
`zebra.colnames` | whether or not use background colors in column names row, Default value is FALSE
`zebra.rownames` | whether or not use background colors in row names column, Default value is TRUE

[Package ztable version 0.2.0 Index]