update_ztable: Update ztable before print

Description Usage Arguments

View source: R/ztable.R

Description

Update options of ztable before print

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
update_ztable(
  z,
  family = NULL,
  size = NULL,
  color = NULL,
  tablewidth = NULL,
  type = NULL,
  include.rownames = NULL,
  placement = NULL,
  position = NULL,
  show.heading = NULL,
  show.footer = NULL,
  caption = NULL,
  caption.placement = NULL,
  caption.position = NULL,
  caption.bold = NULL,
  align = NULL,
  digits = NULL,
  display = NULL,
  sidewaystable = NULL,
  longtable = NULL,
  rotate = NULL,
  turn = NULL,
  angle = NULL,
  wraptable = NULL,
  wraptablewidth = NULL,
  tabular = NULL,
  label = NULL,
  hline.after = NULL,
  booktabs = NULL,
  prefix.rows = NULL,
  commands = NULL,
  top.command = NULL,
  zebra = NULL,
  zebra.color = NULL,
  zebra.type = NULL,
  zebra.list = NULL,
  zebra.colnames = NULL,
  zebra.rownames = NULL,
  colnames.bold = NULL,
  include.colnames = NULL,
  cgroup = NULL,
  n.cgroup = NULL,
  rgroup = NULL,
  n.rgroup = NULL,
  cspan.rgroup = NULL,
  pcol = NULL
)

Arguments

z

An object of class "ztable"

family

Font family. Default value is NULL. Possible value is one of the c("serif","times").

size

An integer from 1 to 10 indicating font size= c("tiny","scriptsize", "footnotesize","small","normalsize","large","Large","LARGE","huge","Huge") respectively.

color

A character indicating color of ztable

tablewidth

A numeric indicating desired table width as a ratio to linewidth. Default value is 0.3.

type

character indicating formats of ztable, either "html" or "latex".

include.rownames

A logical value whether or not include rownames in the table

placement

The table will have placement given by placement where placement must be NULL or contain only elements of "h","t","b","p","!","H".

position

The table will be have placed at the center of the paper if position is "center" or "c", and at the left side of the paper if it equals "left" or "l", and at the right side of the paper if it equals "right" or "r". The position is translated to specific latex environments such as "flushright" or "flushleft" or "center" (provided as a character vector) will enclose the tabular environment.

show.heading

A logical value whether or not include headings in the table.

show.footer

A logical value whether or not include headings in the table.

caption

A character

caption.placement

The caption will be have placed at the top of the table if caption.placement is "top" and at the bottom of the table if it equals "bottom".

caption.position

The caption will be have placed at the center of the table if caption.position is "center" or "c", and at the left side of the table if it equals "left" or "l", and at the right side of the table if it equals "right" or "r".

caption.bold

whether or not use bold font for caption

align

Character vector : nchar equal to the number of columns of the resulting table indicating the alignment of the corresponding columns.

digits

Numeric vector of length equal to one (in which case it will be replicated as necessary) or to the number of columns of the resulting table

display

Character vector of length equal to the number of columns of the resulting table indicating the format for the corresponding columns. Since the row names are printed in the first column, the length of display is one greater than ncol(x) if x is a data.frame. These values are passed to the formatC function. Use "d" (for integers), "f", "e", "E", "g", "G", "fg" (for reals), or "s" (for strings). "f" gives numbers in the usual xxx.xxx format; "e" and "E" give n.ddde+nn or n.dddE+nn (scientific format); "g" and "G" put x[i] into scientific format only if it saves space to do so. "fg" uses fixed format as "f", but digits as number of significant digits. Note that this can lead to quite long result strings.

sidewaystable

Logical value whether or not set the tabular environment= "sidewaystable". Requires Latex "rotating" package in preamble.

longtable

Logical value whether or not set the tabular environment= "longtable". Requires Latex "longtable" package in preamble.

rotate

Logical value whether or not set the tabular environment= "rotate". No special arrangement is made to find space for the result. Requires Latex "rotating" package in preamble. If TRUE, requires the rotate angle(counterclockwise).

turn

Logical value whether or not set the tabular environment= "turn". In this environment, Latex leaves space for the rotated table. Requires Latex "rotating" package in preamble. If TRUE, requires the rotate angle.

angle

An integer indicate the angle to rotate(degree); range -180 to 180.

wraptable

Logical value whether or not set the tabular environment= "wraptable". Requires Latex "wrapfig" package in preamble.

wraptablewidth

A integer indicate wraptable width in centimeter.

tabular

Logical value whether or not set the tabular environment. If TRUE, no tabular environment is set.

label

Character vector of length 1 containing the LaTeX label or HTML anchor. Set to NULL to suppress the label.

hline.after

A vector of numbers between -1 and "nrow(x)", inclusive, indicating the rows after which a horizontal line should appear. If NULL is used no lines are produced. Default value is c(-1,0,nrow(x)) which means draw a line before and after the columns names and at the end of the table. Repeated values are allowed.

booktabs

Logical value. If TRUE, the toprule, midrule and bottomrule tags from the LaTex "booktabs" package are used rather than hline for the horizontal line tags. Requires Latex "booktabs" package in preamble.

prefix.rows

A numeric vector contains the position of rows on which extra Latex commands should be added as a prefix.

commands

A character vector of the length 1 or same length of the nrow of data.frame which contains the command that should be added as a prefix at the specified rows.

top.command

A character vector of the length 1 which contains the command that should be added as a prefix at the colnames row.

zebra

Null or a integer of 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 with specified with zebra.color. A value of 2 sets all even rows. when zebra is 1 or 2, the parameters of prefix.rows and commands ignored.

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").

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 cells[y,x] with "color". The y and x are integer indicating rows and columns. NA value of y or x indicating all columns or rows.

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

colnames.bold

whether or not use bold font for column names.

include.colnames

Logical. If TRUE the column names is printed.

cgroup

A character vector or matrix indicating names of column group. Default value is NULL

n.cgroup

A integer vector or matrix indicating the numbers of columns included in each cgroup Default value is NULL

rgroup

A character vector indicating names of row group. Default value is NULL

n.rgroup

A integer vector indicating the numbers of rows included in each rgroup Default value is NULL

cspan.rgroup

The number of columns that an rgroup should span. It spans by default all columns but you may want to limit this if you have column colors that you want to retain.

pcol

number of column displaying p value


ztable documentation built on Sept. 28, 2021, 9:07 a.m.