update.textTable: Update a 'texttable' Object

Description Usage Arguments Details Value See Also Examples

View source: R/update.bare.R

Description

Update a textTable object with new annotation or rowheadLabels.

Usage

1
2
3
## S3 method for class 'textTable'
update(object, title=NULL, subtitle=NULL, foot=NULL, 
    rowheadLabels=NULL, ...)

Arguments

object

A textTable object, representing a 2D table with all cells formatted as character strings.

title, subtitle, foot

Optional character vectors of annotation for the table. NULL means to leave the current annotation unchanged (the default); character(0) means to omit/remove it.

rowheadLabels

Optional character vector or 1-row matrix specifying labels for the row header columns of the table. NULL means to leave the current value unchanged (the default); character(0) means to omit/remove it.

...

Ignored, with a warning. (Present for compatibility with the generic.)

Details

To indicate that a string in title, subtitle, foot, or rowheadLabels is to be interpreted as a plotmath expression, prefix it with MATH_. To indicate that it contains markdown or HTML tags, prefix it with MKDN_.

Value

A textTable object with annotation set or changed based on the provided arguments.

See Also

textTable

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
ttbl <- textTable(iris2_tab, title="The iris data", 
                  foot="sd = standard deviation")
# Change annotation:
ttbl <- update(ttbl, title=c("The iris data", "Summary statistics by species"), 
               foot=character(0))
plot(ttbl)
# Change row header labels:
ttbl <- update(ttbl, rowheadLabels=c("Species", "Summary\nstatistic"))
plot(ttbl)
  

tablesgg documentation built on June 3, 2021, 1:06 a.m.