The tidytlg package provide a set of function allowing you to produce TLGs using table metadata.

tidytlg Options

  • tidytlg.row_type.levels - The values of row_type and their respective levels. Default: c("TABLE_BY_HEADER", "BY_HEADER1", "BY_HEADER2", "BY_HEADER3", "BY_HEADER4", "BY_HEADER5", "HEADER", "N", "VALUE", "NESTED")

  • tidytlg.fontsize.title - Font size for titles in points. Default: 10

  • tidytlg.fontsize.table.footnote - Font size for footnotes in points. For tables. Default: 9

  • tidytlg.fontsize.listing.footnote - Font size for footnotes in points. For listings. Default: 8

  • tidytlg.fontsize.graph.footnote - Font size for footnotes in points. For graphs. Default: 8

  • tidytlg.fontsize.table - Font size for tables in points. Default: 9

  • tidytlg.fontsize.graph - Font size for graphs in points. Default: 10

  • tidytlg.fontsize.listing - Font size for listings in poins. Default: 8

  • tidytlg.right.padding - Amount of right padding for cells in points. Default: 1

  • tidytlg.left.padding - Amount of left padding for cells in points. Default: 1

  • tidytlg.stat_labels - Labels to be used for each summary statistic in the output table. Will need to have all available statistics if this option is changed!

  • tidytlg.precision.extra - Value to be added on for each summary statistic when calculating precision. This will be used to make different statistics have different precision as needed

  • tidytlg.nested_freq.statlist.default - Default statlist object for nested_freq tables. Default: statlist("n (x.x)")

  • tidytlg.univar.statlist.default - Default statlist object for univar tables. Default: statlist(c("N", "MEANSD", "MEDIAN", "RANGE", "IQRANGE"))

  • tidytlg.freq.statlist.default - Default statlist object for freq tables. Default: statlist("n (x.x)")

  • tidytlg.stat_labels - A data.frame controlling how the stats are labeled in a univar table. See 'Default Stat Labels' section for defaults.

  • tidytlg.denoms.message - A boolean, should a message print detailing what the denominators are?

Default Stat Labels

statlabel
NN
SUMSum
MEANMean
GeoMEANGeometric Mean
SDStd. Dev.
SEStd. Error
GSDGeometric Std. Dev.
GSEGeometric Std. Error
CVCV
MEANSDMean (SD)
MEANSEMean (SE)
MEDIANMedian
MINMinimum
MAXMaximum
RANGERange
Q1First quartile
Q3Third quartile
IQRANGEIQ range
MEDRANGEMedian (Range)
MEDIQRANGEMedian (Q1; Q3)
MEAN_CIMean (95% C.I.)
GeoMEAN_CIGeometric Mean (95% C.I.)

Default Precision Extra

statextra
N0
SUM0
MEAN1
GeoMEAN1
SD2
SE2
GSD2
GSE2
CV1
MEDIAN1
MIN0
MAX0
Q11
Q31
LCL_MEAN2
UCL_MEAN2
LCL_GeoMEAN2
UCL_GeoMEAN2

Updating Options

  • For a single session, an option can be changed by option(<optionToChange> = <NewValue>)

  • To change an option for a single projects across sessions in that projects, place the options update in the .Rprofile in that project directory.

  • To change an option for a user across all sessions, place the options update in the .Rprofile file in the users home directory.

  • To change an option for all users in an R environment, place the options update in the .Rprofile.site file in the R home directory.

See Managing R with .Rprofile, .Renviron, Rprofile.site, Renviron.site, rsession.conf, and repos.conf