Skip to content

DiffXTables

0.1.3Package record

Pattern Analysis Across Contingency Tables

0packages dependsuggested by 1
2.9Kdownloads / year
87.2%test coverage
0/13flavors OK

Overview

About
Maintained by Joe SongCRAN page ↗

Statistical hypothesis testing of pattern heterogeneity via differences in underlying distributions across multiple contingency tables. Five tests are included: the comparative chi-squared test (Song et al. 2014) doi:10.1093/nar/gku086 (Zhang et al. 2015) doi:10.1093/nar/gkv358, the Sharma-Song test (Sharma et al. 2021) doi:10.1093/bioinformatics/btab240, the heterogeneity test, the marginal-change test (Sharma et al. 2020) doi:10.1145/3388440.3412485, and the strength test (Sharma et al. 2020) doi:10.1145/3388440.3412485. Under the null hypothesis that row and column variables are statistically independent and joint distributions are equal, their test statistics all follow an asymptotically chi-squared distribution. A comprehensive type analysis categorizes the relation among the contingency tables into type null, 0, 1, and 2 (Sharma et al. 2020) doi:10.1145/3388440.3412485. They can identify heterogeneous patterns that differ in either the first order (marginal) or the second order (differential departure from independence). Second-order differences reveal more fundamental changes than first-order differences across heterogeneous patterns.

Changes in 0.1.3

2021-05-14

1. Updated user manuals, README, DESCRIPTION, and the vignette.

2021-04-28

1. Added the citation to the Bioinformatics paper describing

Sharma-Song test with observed null table marginals in

DESCRIPTION, CITATION, REFERENCES.bib, and README.md files.

2. Introduced a boolean parameter to compensate the issue of Cochran's

condition of samples value less than 5 in any cell.

2020-12-24

1. Updated DESCRIPTION

2. Introduced null.table.marginal parameter to use the

sharma.song.test with observed and uniform marginal null

Show all changes in 0.1.3Hide the rest of the changes in 0.1.3

population.

3. No longer using the correction of normalized frequency table A

inside function get.e.mat()

4. Added test cases for the uniform marginal null tables.

5. Added test cases for parameter compensated parameter.

6. Updated the user manual for sharma.song.test() function.

7. Added full citation information and DOI number for the

first-order marginal change test ACM paper (Sharma et al, 2020)

in DESCRIPTION, CITATION, REFERENCES.bib, and README.md files.

8. stats::chisq.test() is no longer called inside function

chisq.test.stat(). This reduce the overhead in chisq.test(), as we

only need to compute the Pearson chi-squared test statistic.

2020-12-16

1. Created version 0.1.3 from 0.1.2

From NEWS in the release

Install

Health

CRAN checks
13NOTE
Check messages
NOTERd filesr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64, r-oldrel-macos-arm64, r-oldrel-macos-x86_64, r-oldrel-windows-x86_64, r-patched-linux-x86_64, r-release-linux-x86_64, r-release-macos-arm64, r-release-macos-x86_64, r-release-windows-x86_64
checkRd: (-1) simulate_diff_tables.Rd:72: Lost braces; missing escapes or markup?
    72 |   {The Sharma-Song test} {\code{\link[DiffXTables]{sharma.song.test}}}
       |   ^
checkRd: (-1) simulate_diff_tables.Rd:74: Lost braces; missing escapes or markup?
    74 |   {The comparative chi-squared test} {\code{\link[DiffXTables]{cp.chisq.test}}}
       |   ^
checkRd: (-1) simulate_diff_tables.Rd:76: Lost braces; missing escapes or markup?
    76 |   {The heterogeneity test} {\code{\link[DiffXTables]{heterogeneity.test}}}
       |   ^

CRAN check page ↗

Slowest check: 1.2 min · r-devel-windows-x86_64
Status changes
  • NOTE13 NOTENow
  • NOTE14 NOTE2026-03-10
Advisories

none known

Documentation

In release 0.1.3
READMEYes · 390 wordsVignettesYes · 1 · dynamicNEWSYes · 33% structured · mentions 0.1.3Citation fileYes · cites a publicationWebsitenot declared in DESCRIPTION
Help pages
7
Examples that run
100%7 run in a plain check
Exported functions with examples
100%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
86% with a bibliography file

Downloads

2.9K
CRAN downloads in the past year
Rank #15,267 · ~8/day · ~238/mo
Daily download trend is not available in this view yet.
29630 days
79890 days
2.9K1 year
Compare downloads with other packages →
Also on75 r2u6 autocran

Dependencies

Declared dependencies
7 external dependencies (excludes base and recommended)

Installing DiffXTables adds 5 packages (4 with compiled code, 3.9 MB of source tarballs). Heaviest: Rcpp 1.8 MB, rbibutils 1.1 MB, pander 387 KB.

Depends (2)
R >= 3.0pander
Imports (1)
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect
Suggested by 1
Suggests, most downloaded first

People & History

People (2)
Author, Maintainer since 0.0.1 (2019)
Releases (5)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • 0.1.3Latest
    record
    2021-05-16 · current release · diff ↗
  • 0.1.1
    record
    2020-08-16 · diff ↗ ·
    added 3 exports
    marginal.change.test, strength.test, type.analysis
  • R
    R 4.0.0 released · 2020-04-24
  • 0.1.0
    record
    2020-03-20 · diff ↗ ·
    added 1 export
    simulate_diff_tables
  • 0.0.2
    record
    2019-11-12 · diff ↗
  • 0.0.1
    record
    2019-11-04
  • R
    R 3.6.0 released · 2019-04-26

Package metadata

First published
2019-11-04
Total releases
5 / 7 yrs
License
LGPL (>= 3) OSI
Minimum R
≥ 3.0
Download size
126 KB

Cite

Cite this package

Run in R for the authors' entry:

citation("DiffXTables")

The package provides a citation file, so citation() returns the authors' own entry.

It points to 10.1093/nar/gku086, 10.1093/nar/gkv358, 10.1145/3388440.3412485, 10.1093/bioinformatics/btab240.

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 DiffXTables version 0.1.3 [Data set]. HJJB, LLC. Data release v2026-10-23. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-23, 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