Skip to content
crosstable needs flextable, which CRAN will archive unless its check problems are fixed by Oct 22.

crosstable

0.9.0Package record

Crosstables for Descriptive Analyses

0packages dependsuggested by 1
27.7Kdownloads / year
71.6%test coverage
13/13flavors OK

Overview

About

Create descriptive tables for continuous and categorical variables. Apply summary statistics and counting function, with or without a grouping variable, and create beautiful reports using 'rmarkdown' or 'officer'. You can also compute effect sizes and statistical tests if needed.

Changes in 0.9.0

New features

  • New function body_add_flextable2(): automatically adds a legend if the flextable object has a "legend" attribute. Equivalent functionality is now available in body_add_gg2(). (#100)
  • New argument rename_with_labels(cols), more intuitive than except. (#99)
  • New function ct_bind_cols() helper to combine (column-bind) two multi-by crosstables into a wider crosstable, enabling multi-column outputs with intra-group margins (**experimental**). (#97)
  • New argument as_flextable(allow_breaks=FALSE), to avoid breaking a table group in 2 pages. (#92)
  • New argument as_flextable(compact=TRUE, collapse), to collapse levels in compact format. (#98)

For example, collapse="Yes" will yield a single row for the "Yes" level, instead of a redundant Yes/No that sums up to 100%. This will only apply if there are 2 levels only, NA included. See examples for more.

Documentation

  • New vignette on advanced customization, demonstrating how to plug custom summary functions, effect estimators and statistical tests into crosstable(). (#112)
  • New hex logo! (#115)

Bug fixes and improvements

  • Fixed ct_compact() so that .id is kept in the output.
Show all changes in 0.9.0Hide the rest of the changes in 0.9.0
  • Improved format_fixed() for more reproducible output across platforms. This may result in minor rounding differences. (#114)
  • Fixed bug in rename_with_labels() when except contains c().(#99)
  • Fixed bug in crosstable() when a factor variable had NA as a level (like after forcats::fct_value_to_na_level()). (#94)
  • Fixed as_flextable() so that compact=TRUE works in transposed (t()) crosstables (#91).
  • Fixed as_flextable() so that keep_id=TRUE works in multi-by crosstables (#88).

Lifecycle

  • compact(), conflicting with purrr::compact() and deprecated if favor of ct_compact() since 2022, has been removed from the package.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 5.7 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-07-29
  • ERROR12 OK, 1 ERROR2026-07-23
  • OK13 OK2026-07-19
Show 20 earlier changesHide 20 earlier changes
  • ERROR12 OK, 1 ERROR2026-07-18
  • OK13 OK2026-07-03
  • ERROR12 OK, 1 ERROR2026-06-25
  • OK13 OK2026-06-13
  • ERROR12 OK, 1 ERROR2026-06-07
  • OK13 OK2026-05-29
  • ERROR12 OK, 1 ERROR2026-05-24
  • OK13 OK2026-05-11
  • ERROR12 OK, 1 ERROR2026-05-10
  • OK13 OK2026-05-09
  • ERROR12 OK, 1 ERROR2026-05-03
  • OK13 OK2026-05-02
  • ERROR11 OK, 1 ERROR2026-04-25
  • OK14 OK2026-04-11
  • ERROR13 OK, 1 ERROR2026-04-09
  • OK14 OK2026-04-07
  • ERROR13 OK, 1 ERROR2026-04-04
  • OK14 OK2026-03-25
  • ERROR13 OK, 1 ERROR2026-03-22
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 0.9.0
READMEYes · 657 wordsVignettesYes · 5 · dynamicNEWSYes · 100% structured · mentions 0.9.0Citation fileNoWebsiteYes · pkgdown
Help pages
60 (2 internal)includes a package overview page
Examples that run
97%34 run in a plain check · 1 never run
Exported functions with examples
58%
Documented parameters
92%
Return-value docs
98%
Help pages citing references
0%

Downloads

27.7K
CRAN downloads in the past year
Rank #2,842 · ~76/day · ~2.3K/mo
Daily download trend is not available in this view yet.
1.5K30 days
5.1K90 days
27.7K1 year
Compare downloads with other packages →
Also on126 r2u12 autocran

Repository

120Stars
8Forks
11Open issues
2Open PRs
17Releases
1,189Commits
7Commit identities
rdescriptive-statisticsrstatshtml-reportfrequency-tablemswordflextableofficer
1,189 commits · Last activity 2026-09-14 · 0% stars, 30d · Default branch at 0.9.0.9009, ahead of CRAN 0.9.0 (checked 2026-10-11) · Discussions: 1 post
Responsiveness
How these are sampled
PRs merged (all time)
78%
Median days to close, 50 most recently updated closed issues
63
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2025-06-05 · 1162026-07-16 · 120
PracticesBeta

14 development-tooling and community-health practices detected across 8 families in the upstream repository

Checks run against github.com/danchaltiel/crosstable on 2026-10-11.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Governance and community (1)
Issue templates
Docs source (3)
pkgdown

GitHub Pages site last deployed 2026-09-14 · The repository has a site deploy workflow

pkgdown site last built 2026-09-14

Coverage (1)
Coverage reporting (Codecov)
Show all practicesHide 4 practices
Reproducibility and dev environment (1)
data-raw/
CRAN release process (3)
cran-comments.mdrevdep/CRAN-SUBMISSION
Research and citation (1)
codemeta.json
Lint, format, editor (2)
lintrRStudio project
How this is detected·Detection ruleset v3 (2026-09-26)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • GitHub Copilotfirst seen 2026-09-14
    Pull request: opened by its own account
    Commits: 1 by its own account · at least 1 crediting it in the message
Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
36 external dependencies (excludes base and recommended)

Installing crosstable adds 61 packages (38 with compiled code, 54 MB of source tarballs). Heaviest: stringi 11 MB, data.table 5.7 MB, bslib 5.6 MB.

Depends (1)
R >= 3.6.0
LinkingTo (0)
none
Enhances (0)
none
Dependencies facing archival

CRAN will archive these unless their check problems are fixed by the date shown. This package needs each one to install.

Reverse dependencies
0direct
0indirect
Suggested by 1
Suggests, most downloaded first

Datasets

People & History

People (2)
Author, Maintainer since 0.2.1 (2021)
Releases (15)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • 0.9.0Latest
    record
    2026-03-15 · current release · diff ↗ ·
    removed 1 export
    compact
    added 2 exports
    body_add_flextable2, ct_bind_cols
  • 0.8.2
    record
    2025-09-08 · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • 0.8.1
    record
    2024-11-01 · diff ↗
  • 0.8.0
    record
    2024-09-30 · diff ↗
  • R
    R 4.4.0 released · 2024-04-24
  • 0.7.0
    record
    2023-11-12 · diff ↗ ·
    added 1 export
    body_add_table_section
  • unarchivedReturned to CRAN
    2023-05-29
  • 0.6.2
    record
    2023-05-29 · diff ↗
  • archivedRemoved from CRAN
    2023-05-20
    issues were not corrected in time
  • R
    R 4.3.0 released · 2023-04-21
  • 0.6.1
    record
    2023-04-04 · diff ↗
  • 0.6.0
    record
    2023-03-26 · diff ↗ ·
    added 7 exports
    body_add_table_list, get_percent_pattern, is.compacted_crosstable, is.multiby_crosstable, is.transposed_crosstable, pivot_crosstable, transpose_crosstable
  • 0.5.0
    record
    2022-08-16 · diff ↗ ·
    added 5 exports
    clean_names_with_labels, crosstable_reset_options, ct_compact, narm, rename_with_labels
  • R
    R 4.2.0 released · 2022-04-22
Show 10 earlier eventsHide 10 earlier events
  • 0.4.1
    record
    2022-02-25 · diff ↗
  • unarchivedReturned to CRAN
    2022-02-14
  • 0.4.0
    record
    2022-02-14 · diff ↗
  • archivedRemoved from CRAN
    2022-02-06
    check problems were not corrected in time
  • 0.3.2
    record
    2021-11-27 · diff ↗ ·
    added 3 exports
    body_replace_text_at_bkms, crosstable_options, crosstable_peek_options
  • 0.3.1
    record
    2021-11-14 · diff ↗ ·
    added 3 exports
    body_add_crosstable_list, body_add_flextable_list, is.crosstable
  • 0.2.2
    record
    2021-10-19 · diff ↗ ·
    added 3 exports
    af, diff_median_boot, generate_autofit_macro
  • R
    R 4.1.0 released · 2021-05-18
  • 0.2.1
    record
    2021-03-08
  • R
    R 4.0.0 released · 2020-04-24

Package metadata

First published
2021-03-08
Total releases
15 / 5 yrs
License
GPL-3 OSI
Minimum R
≥ 3.6.0
Bundled data
2.9 KB / 2 files
Download size
1.4 MB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("crosstable")
Chaltiel, D., & Hajage, D. (2026). crosstable: Crosstables for Descriptive Analyses (Version 0.9.0) [Computer software]. https://doi.org/10.32614/CRAN.package.crosstable

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for crosstable version 0.9.0 [Data set]. HJJB, LLC. Data release v2026-10-18. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy