st_notes: Add note information to st object

View source: R/table-object.R

st_notesR Documentation

Add note information to st object

Description

See the notes and note_config arguments passed to stable() and then to tab_notes(). The function can be called multiple times and can accumulate notes data in various ways. Use st_notes_app() as a short cut to append a note to the previous line and st_notes_str() to convert all existing notes into a single string.

Usage

st_notes(
  x,
  ...,
  esc = NULL,
  config = NULL,
  collapse = "; ",
  append = FALSE,
  to_string = FALSE
)

Arguments

x

an stobject.

...

character; one or more table notes.

esc

passed to tab_escape(); use NULL to bypass escaping the notes.

config

named list of arguments for noteconf().

collapse

a character string to separate notes which are pasted together when flattening or appending; this should usually end in a single space (see default).

append

logical; if TRUE, then incoming notes are appended to the previous, single note in the notes list. When ... contains multiple notes, then the notes are pasted together first.

to_string

logical; if TRUE, then all notes are collapsed to a single string.

See Also

st_notes_detach(), st_notes_rm(), st_notes_str(), st_notes_app()

Examples

library(dplyr)

ob <- st_new(ptdata())

ob %>% st_notes("ALB: albumin (g/dL)") %>% stable()


metrumresearchgroup/pmtables documentation built on Dec. 22, 2024, 1:34 a.m.