Learn R Programming

tidytlg (version 0.11.0)

rmdpstitle: Get Titles and Footnotes for all TLGs or one specific TLG

Description

Get Titles and Footnotes for all TLGs or one specific TLG

Usage

rmdpstitle(
  df,
  tblid,
  idvar = "tblid",
  identifier = "identifier",
  text = "text"
)

Value

list of length two, the first element contains the titles as a tibble and the second contains the footnotes as a list.

Arguments

df

dataframe with three variables; table name, row identifier (TITLE or FOOTNOTEn), and title or footnote text to display.

tblid

character vector containing the table id, optional, used to subset df to a specific table (defaults to tblid).

idvar

character vector containing the variable in df that contains your table id.

identifier

character vector containing the variable name in df that contains your record identifier (defaults to "identifier").

text

character vector containing the variable name in df that contains your title and footnote text (defaults to "text").

Examples

Run this code
tblid <- "TSIDEM01"

titles <- tibble::tribble(
  ~tblid, ~identifier, ~text,
  "TSIDEM01", "TITLE", "Demographics Example",
  "TSIDEM01", "FOOTNOTE1", "Example footnote."
)

title_foot <- rmdpstitle(titles, tblid)

title_foot[[1]]
title_foot[[2]]

Run the code above in your browser using DataLab