Skip to content

PubMatrixR

1.0.1Package record

PubMed Pairwise Co-Occurrence Matrix Construction and Visualization

0packages depend
1.7Kdownloads / year
92.0%test coverage
13/13flavors OK

Overview

About

Queries the 'NCBI' (National Center for Biotechnology Information) Entrez 'E-utilities' API to count pairwise co-occurrences between two sets of terms in 'PubMed' or 'PubMed Central'. It returns a matrix-like data frame of publication counts and can export hyperlink-enabled results in CSV or ODS format. The package also provides heatmap helpers for exploratory visualization of overlap patterns. Based on the method described in Becker et al. (2003) "PubMatrix: a tool for multiplex literature mining" doi:10.1186/1471-2105-4-61.

Changes in 1.0.1

Breaking changes

  • plot_pubmatrix_heatmap() and pubmatrix_heatmap() now plot raw co-occurrence counts by default, and take a new values argument to choose otherwise. Earlier versions always plotted a percentage the docs called intersection / union * 100, but the totals in that formula were row and column sums of whatever matrix you passed in, not the publication counts for each term on its own. Adding an unrelated term changed the number shown in every other cell. The old calculation is still there as values = "relative", now documented with that caveat. values = "row_pct" divides each count by its row total.

Bug fixes

  • PubMatrix() no longer drops columns when A repeats a term, or rows when B does. Duplicates now raise an error, and the result matrix is filled positionally instead of by name.
  • Character matrices passed to the heatmap helpers keep their row names. A single-row matrix no longer comes back transposed into a single column.
  • Term file parsing handles blank lines, and a # separator on the first or last line now gives an error that names the file instead of complaining about missing terms.
  • A matrix where every value is the same now warns and draws a single-colour heatmap. It used to stop with an error.
  • Heatmap validation errors no longer print internal call context.

Other improvements

  • Requests are spaced out to stay under the NCBI rate limits: 3 per second without an API key, 10 with one. Set PubMatrixR.min_interval to override.
  • Failed queries back off exponentially between retries, and the default number of attempts (PubMatrixR.n_tries) is now 3. Both options are documented.
  • Queries drop usehistory=y and set retmax=0, so responses no longer carry PMIDs the package never looks at.
Show all changes in 1.0.1Hide the rest of the changes in 1.0.1
  • Added coverage reporting through covr and Codecov, and set Config/testthat/edition: 3.
  • The test suite went from 29 assertions to 73.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 1.7 min · r-release-macos-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK3 OK2026-03-13
Advisories

none known

Documentation

In release 1.0.1
READMEYes · 1,317 wordsVignettesYes · 2 · dynamicNEWSYes · 100% structured · mentions 1.0.1Citation fileYes · cites a publicationWebsiteYes · pkgdown
Help pages
4 (1 internal)includes a package overview page
Examples that run
100%3 run in a plain check
Exported functions with examples
100%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
0%

Downloads

1.7K
CRAN downloads in the past year
Rank #20,220 · ~5/day · ~144/mo
Daily download trend is not available in this view yet.
26230 days
65190 days
1.7K1 year
Compare downloads with other packages →
Also on58 r2u4 autocran

Repository

1Stars
0Forks
0Open issues
0Open PRs
2Releases
38Commits
1Commit identities
ncbi-databasepubmedrdataminingbibliometricsliterature-miningbibliometric-analysisbibliometric-visualization
38 commits · Last activity 2026-08-20 · 0% stars, 30d
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
not measured
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2026-06-28 · 12026-07-07 · 1
PracticesBeta

5 development-tooling and community-health practices detected across 4 families in the upstream repository

Checks run against github.com/toledoem/pubmatrixr-v2 on 2026-10-18.

Continuous integration (2)
GitHub ActionsR CMD check workflow

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

Docs source (1)
pkgdown
Coverage (1)
Coverage reporting (Codecov)
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
12 external dependencies (excludes base and recommended)

Installing PubMatrixR adds 29 packages (14 with compiled code, 20 MB of source tarballs). Heaviest: stringi 11 MB, farver 1.2 MB, viridisLite 1.2 MB.

Depends (1)
R >= 4.1.0
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

People & History

People (2)
Author, Maintainer since 1.0.0 (2026)
Releases (2)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • 1.0.1Latest
    record
    2026-03-12 · current release · diff ↗
  • 1.0.0
    record
    2026-03-12
  • R
    R 4.5.0 released · 2025-04-11

Package metadata

First published
2026-03-12
Total releases
2 / 1 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 4.1.0
Download size
1.7 MB

Cite

Cite this package

Run in R for the authors' entry:

citation("PubMatrixR")

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

It points to 10.1186/1471-2105-4-61.

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

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