Skip to content

tidydr

0.0.7Package record

Unify Dimensionality Reduction Results

0packages depend
246.2Kdownloads / year
86.3%test coverage
13/13flavors OK

Overview

About

Dimensionality reduction is widely used in many domains for analyzing and visualizing high-dimensional data. 'tidydr' provides uniform output and is compatible with multiple methods, including 'prcomp', 'cmdscale', 'Rtsne', 'umap' and 'metaMDS'. Any function returning a numeric matrix can also be used. The unified result can be visualized directly with 'ggplot2', and several methods can be run and compared in a single call.

Changes in 0.0.7
  • nk() can now use any clustering method through fun (2026-10-08, Thu)
  • fun defaults to cluster::pam, so the default result is bit-for-bit unchanged
  • stats::kmeans works out of the box; stats::hclust is cut with cutree()
  • a function returning a plain vector of cluster labels is also accepted
  • for non-pam clusterers the silhouette width is computed with cluster::silhouette() and assembled into the same shape pam() produces
  • silinfo_widths() exports the fine-grained silhouette widths of one k (2026-10-08, Thu)
  • returns a data.frame with sample, cluster, neighbor and sil_width
  • the per-cluster averages are attached as the "clus.avg.widths" attribute
  • autoplot() for a silinfo object gained a silhouette bar plot (2026-10-08, Thu)
  • type = "silhouette" draws the classic per-cluster bar plot
  • type is inferred from k when it is not given, so autoplot(x) is unchanged and autoplot(x, k = 3) still draws the same plot — except that the sample labels are now correct (see the fix below)
Show all changes in 0.0.7Hide the rest of the changes in 0.0.7
  • fixed: autoplot(x, k = ) aligned pam()'s silhouette table to the samples by position, but pam() returns that table sorted by cluster; the labels are now matched by sample name (agreement with the true clustering on iris, k = 3, goes from 84% to 100%)
  • added dr_compare() to run several dimensionality reduction methods at once (2026-10-08, Thu)
  • every method is evaluated independently: a method that fails is reported in $summary with its error message instead of aborting the whole call
  • $summary gives method, status, n, k, has_eigenvalue, has_stress and error, so it is visible which methods ran and which did not
  • autoplot() facets the methods that produced plottable coordinates
  • DrResult gained a sample_info slot for method-specific, per-sample information (2026-10-08, Thu)
  • a dr_extract() method may return sample_info; fortify() merges its length-n elements into the returned data.frame as columns
  • print() output is unchanged
  • the methods advertised by available_methods() are now backed by tests (2026-10-08, Thu)
  • all 14 advertised methods are exercised end-to-end through dr()
  • vegan, smacof, ecodist, ade4, labdsv added to Suggests, together with ape, MASS, Rtsne and uwot, which the tests already used
  • available_methods("all") prints its closing note once instead of twice (2026-10-08, Thu)
  • the note is shared by the data and the distance listing but was printed from both branches, so it appeared twice; it is now printed once, after both listings
  • the "data" and "distance" branches are unchanged, and the returned value is unaffected
  • dr() now validates its data input and fails early with a tidydr-specific message instead of forwarding an obscure error from the underlying method (2026-10-08, Thu)
  • rejects NULL, bare vectors (hint: use as.dist() for distance vectors), non-numeric data, data.frames with non-numeric columns, and NA/NaN/Inf
  • dist objects remain supported
  • nk() now validates data and k (2026-10-08, Thu)
  • k = 1 is rejected: the silhouette width is undefined for a single cluster (previously produced an object that could not be printed)
  • k >= n, non-integer and non-numeric k are rejected with clear messages
  • data may still be a numeric matrix, a numeric data.frame, or a 'dist' object
  • fortify() no longer mishandles metadata (2026-10-08, Thu)
  • matrix metadata is no longer silently dropped (converted to a data.frame)
  • a list of length n no longer creates n junk .group.* columns
  • atomic vectors (including classed ones such as Date) are used as .group
  • unsupported types raise a warning listing the supported types
  • added a dr_extract() fallback for plain numeric matrices (2026-10-08, Thu)
  • makes stats::cmdscale() (and any wrapped method returning a bare matrix) work
  • any function returning a numeric matrix with at least two columns is accepted
  • non-numeric or single-column matrices are rejected
  • a hand-written dr_extract() method may return the coordinates as a numeric matrix (2026-10-08, Thu)
  • previously rejected with "length of 'dimnames' [2] not equal to array extent": the Dim1, Dim2, ... names were assigned with seq_along(), which counts *elements* rather than columns on a matrix
  • the matrix is now converted to a data.frame, so fortify() -- a 'ggplot2' generic -- always returns a data.frame
  • a drdata that is neither a data.frame nor a numeric matrix is now rejected with a message pointing at ?dr_extract, instead of a cryptic error
  • added a GitHub Actions workflow that runs R CMD check on push and PR (2026-10-08, Thu)

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 12.7 min · r-release-macos-x86_64
Status changes
  • OK13 OK2026-08-04
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-09
  • NOTE12 OK, 1 NOTE2026-06-07
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 0.0.7
READMEYes · 167 wordsVignettesYes · 1 · dynamicNEWSYes · 100% structured · mentions 0.0.7Citation fileNoWebsitenot declared in DESCRIPTION
Help pages
11 (2 internal)includes a package overview page
Examples that run
100%5 run in a plain check
Exported functions with examples
50%
Documented parameters
93%
Return-value docs
90%
Help pages citing references
0%
Vignettes (1)

Downloads

246.2K
CRAN downloads in the past year
Rank #705 · ~675/day · ~20.5K/mo
Daily download trend is not available in this view yet.
24.8K30 days
75.2K90 days
246.2K1 year
Compare downloads with other packages →
Also on8K r2u8 autocran47.9K conda_forge

Repository

15Stars
7Forks
0Open issues
0Open PRs
0Releases
42Commits
4Commit identities
42 commits · Last activity 2026-10-13 · 0% stars, 30d
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
1,493
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2025-06-22 · 152026-07-07 · 15
PracticesBeta

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

Checks run against github.com/yulab-smu/tidydr 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

Reproducibility and dev environment (1)
Makefile
CRAN release process (1)
CRAN-SUBMISSION
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
17 external dependencies (excludes base and recommended)

Installing tidydr adds 30 packages (15 with compiled code, 18 MB of source tarballs). Heaviest: ggplot2 6.0 MB, isoband 1.5 MB, fs 1.4 MB.

Depends (0)
none
Imports (7)
clusterggfunggplot2gridrlangstatsutils
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

People & History

People (2)
Author, Maintainer since 0.0.3 (2021), Copyright holder
Listed in earlier versions (1)
no longer listed · 0.0.3 to 0.0.6
Releases (5)

Pick two releases to compare their code metrics.

  • 0.0.7Latest
    record
    2026-10-09 · current release · diff ↗ ·
    added 2 exports
    dr_compare, silinfo_widths
  • R
    R 4.6.0 released · 2026-04-24
  • 0.0.6
    record
    2025-07-25 · diff ↗ ·
    added 1 export
    nk
  • 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
  • 0.0.5
    record
    2023-03-08 · diff ↗
  • R
    R 4.2.0 released · 2022-04-22
  • 0.0.4
    record
    2022-03-16 · diff ↗ ·
    added 1 export
    available_methods
  • 0.0.3
    record
    2021-12-08
  • R
    R 4.1.0 released · 2021-05-18

Package metadata

First published
2021-12-08
Total releases
5 / 5 yrs
License
Artistic-2.0 OSI
Download size
334 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("tidydr")
Yu, G., & Xu, S. (2026). tidydr: Unify Dimensionality Reduction Results (Version 0.0.7) [Computer software]. https://doi.org/10.32614/CRAN.package.tidydr

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 tidydr version 0.0.7 [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