element_refmark: Specify a Reference Mark that can be Added to Table Entries

Description Usage Arguments Details Value See Also Examples

View source: R/elements.bare.R

Description

Specify a reference mark (a symbol placed before or after entry text to indicate cross-references; e.g. for footnotes) that can be added to entries in a table.

Usage

1
element_refmark(mark=NULL, side=NULL, raise, ..., inherit.blank=FALSE)

Arguments

mark

Character string containing the character(s) to be used as the reference mark.

side

Character string indicating where the reference mark is to be placed: "before" or "after" the entry text.

raise

Logical scalar. If TRUE, the reference mark will be displayed as a superscript, using plotmath. The default is TRUE except for asterisk marks, since that character is already raised relative to other characters.

...

Additional arguments passed to element_entry. These can be used to set other graphical properties of table entries at the same time as setting the reference mark. However it is an error to set text or textspec to anything other than NULL, since they are used internally by this function.

inherit.blank

Ignored.

Details

This function is modeled on the element_* functions used in ggplot2 to specify graphical properties in themes. It is primarily used to create the value on the right-hand side of an assignment involving the props<- group of setter functions.

Value

An object of S3 classes element_refmark and element. If any arguments are specified in ..., they are passed to element_entry and the resulting object is attached as attribute extra.

See Also

addRefmark for a different way to add reference marks, and for more information about reference marks in general. element_entry, props<-, propsa<-, propsd<-.

Examples

1
2
3
4
5
6
7
8
plt <- plot(iris2_tab, title="Summary statistics for the iris data", 
            foot="sd = standard deviation")
props(plt, id="foot") <- element_refmark(mark="*", side="before")
# Add a reference mark to just the first appearance of 'sd' in the row header:
propsa(plt, arows=arow(plt, hpath=c("setosa", "sd")), acols=2) <- 
       element_refmark(mark="*", side="after")
plt
  

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