Package: tsg 0.2.0

Bhas Abdulsamad

tsg: Generate Publication-Ready Statistical Tables

A table and summary generator: a collection of functions for generating frequency tables and cross-tabulations of categorical variables. The resulting tables can be exported to various formats (Excel, PDF, HTML, etc.) with extensive formatting and layout customization options.

Authors:Bhas Abdulsamad [aut, cre, cph]

tsg_0.2.0.tar.gz
tsg_0.2.0.zip(r-4.7-any)tsg_0.2.0.zip(r-4.6-any)
tsg_0.2.0.tar.gz(r-4.7-any)tsg_0.2.0.tar.gz(r-4.6-any)
tsg_0.2.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
tsg/json (API)

# Install 'tsg' in R:
install.packages('tsg', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/yng-me/tsg/issues

Pkgdown/docs site:https://yng-me.github.io

Datasets:

On CRAN:

Conda:

4.65 score 1 packages 638 downloads 25 exports 38 dependencies

Last updated from:420e9a0d76. Checks:6 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-develOK212
source / vignettesOK261
linux-releaseOK229
windows-develOK275
windows-releaseOK296
wasm-releaseOK125

Exports:add_column_totaladd_facadeadd_facade_altadd_footnoteadd_row_totaladd_source_noteadd_table_subtitleadd_table_titleas_gtcollapse_listconvert_factorgenerate_crosstabgenerate_frequencygenerate_outputgenerate_summarygenerate_templateget_tsg_facaderemove_labelremove_labelsrename_labelwrite_docxwrite_gsheetwrite_htmlwrite_pdfwrite_xlsx

Dependencies:bitbit64clicliprcpp11crayondplyrforcatsfsgenericsgluehavenhmsjsonlitelifecyclemagrittropenxlsxpillarpkgconfigprettyunitsprogresspurrrR6Rcppreadrrlangstringistringrtibbletidyrtidyselecttzdbutf8vctrsvroomwithryamlzip

Customizing How Your Tables Look
Using a built-in style | Tweaking a few settings with add_facade() | Common tweaks | Borders | Applying the same tweaks across formats | Making your own style file | Step 1: generate the template | Step 2: edit the file | Step 3: use your style | Programmatic style overrides | Style property reference | Table-level settings (full list) | Colour values | Section names

Last update: 2026-11-20
Started: 2026-05-05

Getting Started with tsg
The sample dataset | Count values in a column | Count several columns at once | Show only the top categories | Control how rows are sorted | Include or exclude missing values | Combine similar columns into one table | Other options | Compare two columns in a grid (cross-tabulation) | Percentages by column instead of by row | Cross-tabulate against several columns at once | Break down results by a group | Summarise numeric columns | Work with data in a database | Save your table to a file | Add a title and notes | Change the look of your table | Save to other formats

Last update: 2026-11-20
Started: 2025-11-09

Grouped Tables and Side-by-Side Comparisons
Get a separate table for each group | Add a grand total to grouped tables | Flat table with total rows inserted | Separate tables with a total entry per level | Change the total label | Compare several Yes/No indicators side by side | Basic usage | Count a different response level | Combining with grouping | Full comparison table with hierarchical columns | Basic stacked table | Custom label separator | Three or more column variables | Export many tables to one Excel file | Basic multi-sheet export | Add an index sheet | Save each table to its own file | End-to-end example | Controlling where footnotes appear | Left and right placement | Linking a footnote to a column header (HTML / PDF) | Chaining multiple footnotes | Tips

Last update: 2026-11-20
Started: 2026-05-05

Saving and Sharing Your Tables
Saving to Excel | Basic save | Add a title, subtitle, and notes | More table examples | Frequency table with running totals | Grouped frequency table | Basic cross-tabulation | Cross-tabulation with column percentages | Save multiple tables to one workbook | Save each table to its own file | Add an index sheet to a multi-table workbook | Managing metadata for large reports | Step 1: Create a template | Step 2: Fill in the reference data | Step 3: Export with the reference | Saving to HTML | Multiple tables in one HTML file | Saving to PDF | Saving to Word | Summary

Last update: 2026-11-20
Started: 2026-05-05

Writing Excel workbooks with write_xlsx()
The big picture | One table | A crosstab with merged headers | Several column variables side by side | A summary table | A list of tables: one sheet each | All tables on one sheet | One workbook per table | Grouped tables | One group: one sheet per group | Groups in one table | Two or more groups: titles inside the sheet | All groups on one sheet | Group names as a column | A table list: an index sheet with links | Keeping titles and numbers in a reference table | From a file | Changing the look | Passing options to openxlsx | Where to go next

Last update: 2026-11-20
Started: 2026-11-20

Writing tables to Google Sheets
How it works | Setup | Create a sheet | Update a sheet in place | Styling | Several tables in one spreadsheet | With generate_output() | Sharing | Scheduled scripts | Troubleshooting

Last update: 2026-11-20
Started: 2026-11-20