Skip to content

Biplot Analysis for Multivariate Data Using Principal Components

0packages depend
9.1Kdownloads / year
92.5%test coverage
13/13flavors OK

Overview

About

Provides tools for creating 2D and 3D biplots of multivariate data based on principal components analysis, together with diagnostics for reduction quality and enhanced visualization of variables and objects.

Changes in 1.5-0

Breaking changes

  • var.rdf() now returns a structured list of class 'var.rdf' instead of a plain character data.frame. The three fields are: $display (character data.frame with '*', '', and '-' entries, for tabular display), $numeric (numeric matrix of absolute percentage differences), and $flagged (logical matrix, TRUE where the discrepancy exceeds limit). Code that accessed bp$var.rd as a data.frame directly must be updated to use bp$var.rd$display.
  • summary.bpca() no longer accepts the presentation argument. The printing behaviour previously triggered by presentation = TRUE is now handled by the new print.summary.bpca() S3 method; calling print(summary(bp)) produces the same output.

New S3 methods

  • print.var.rdf(): printing a var.rdf object (e.g. print(bp$var.rd)) automatically displays the character table ($display).
  • print.summary.bpca(): separates computation from presentation following R's S3 convention. summary.bpca() now only computes and returns the summary object; print.summary.bpca() handles console output.

Internal refactoring (no public API change)

  • New file R/bpca-utils.R introduces four shared internal helpers that eliminate duplicated code across the package:
  • .center_scale(x, center, scale): centering and scaling logic previously duplicated between bpca.default() and dt.tools().
  • .cosine_matrix(m): pairwise cosine similarity between rows of a matrix, previously duplicated between var.rbf() and dt.tools().
  • .compute_var_factor(coobj, covar): automatic variable-scaling factor for biplots, previously duplicated between plot.bpca.2d() and plot.bpca.3d().
  • .pc_axis_labels(eigenvalues, dims): axis labels in "PC1 (38.5%)" format, previously duplicated between plot.bpca.2d() and plot.bpca.3d().
Show all changes in 1.5-0Hide the rest of the changes in 1.5-0
  • plot.bpca.2d() decomposed from a single 634-line function into three files:
  • R/plot.bpca.2d.helpers.R: eight internal drawing functions (.draw_obj(), .draw_var(), .draw_var_seg(), .draw_circles(), .draw_axis_cross(), .proj_on_direction(), .solve_orthogonal_intersection(), .draw_circles_at()), extracted from closures that were recreated on every call.
  • R/plot.bpca.2d.types.R: ten internal type functions (.plot_type_bp() through .plot_type_rv()), one per switch branch, each independently readable and testable.
  • R/plot.bpca.2d.R: reduced to ~160 lines — validation, state preparation, context list (ctx) construction, and dispatch via switch().
  • pc.names in bpca.default() is now generated once and reused for svdx.scal$v, g.scal, and hl.scal column names (previously generated twice).
  • The fragile while loop in plot.bpca.2d(type = 'ww') — which relied on an NA sentinel at the end of chull() output — was replaced by a for loop with circular indexing over all convex-hull edges, including the closing edge.

Testing

  • Test suite expanded from 3 to 45 tests. New coverage includes: all four factorization methods (hj, sqrt, jk, gh); all four centering modes (center = 0:3); all four internal helpers (.center_scale, .cosine_matrix, .compute_var_factor, .pc_axis_labels); var.rbf and var.rdf (including the new list structure); dt.tools; qbpca; summary.bpca and print.summary.bpca; all ten 2D plot types; 3D static plot; plot.qbpca; and bpca.prcomp.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 1.8 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 1.5-0
READMEYes · 249 wordsVignettesYes · 2 · dynamicNEWSYes · 100% structured · mentions 1.5-0Citation fileYes · computed when R runs itWebsitenot declared in DESCRIPTION
Help pages
14includes a package overview page
Examples that run
100%14 run in a plain check
Exported functions with examples
100%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
57%

Also includes 12 demo scripts (run with demo())

Downloads

9.1K
CRAN downloads in the past year
Rank #4,996 · ~25/day · ~761/mo
Daily download trend is not available in this view yet.
73130 days
1.6K90 days
9.1K1 year
Compare downloads with other packages →
Also on161 r2u19 autocran2K conda_forge117 c2d4u

Repository

4Stars
2Forks
0Open issues
0Open PRs
0Releases
42Commits
3Commit identities
42 commits · Last activity 2026-10-06 · 0% stars, 30d · Default branch at 1.5-1, ahead of CRAN 1.5-0 (checked 2026-10-11)
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

2017-04-19 · 32026-07-07 · 4
PracticesBeta

Checks run against github.com/jcfaria/bpca on 2026-10-11.

No development-tooling practices detected in the upstream repository.

How this is detected·Detection ruleset v3 (2026-09-26)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Cursorfirst seen 2026-04-30
    Pull request it wrote: opened by a project member
    Commits: 2 by its own account · at least 21 crediting it in the message
  • Claude Codefirst seen 2026-10-06
    Commits: at least 1 crediting it in the message
Models named in its commits
  • Claude Opus 5.51 commit · Oct 2026
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
6 external dependencies (excludes base and recommended)

Installing bpca adds 30 packages (16 with compiled code, 24 MB of source tarballs). Heaviest: bslib 5.6 MB, rgl 4.0 MB, sass 2.9 MB.

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

Nothing depends on this yet.

Datasets

People & History

People (3)
Author, Maintainer · added in 1.3-6
Author · added in 1.3-6
Author · added in 1.3-6

Maintainer since 1.0.2 (2008)

Listed in earlier versions (2)
no longer listed · 1.0.2 to 1.0-10
no longer listed · 1.0.2 to 1.0-10
Releases (15)

Pick two releases to compare their code metrics.

  • 1.5-0Latest
    record
    2026-05-25 · current release · diff ↗
  • 1.4-3
    record
    2026-05-11 · diff ↗ ·
    removed 1 export
    pattern:.
    added 6 exports
    bpca, dt.tools, qbpca, var.rbf, var.rdf, xtable.bpca
  • R
    R 4.6.0 released · 2026-04-24
  • 1.3-9
    record
    2026-04-21 · diff ↗
  • 1.3-8
    record
    2025-09-11 · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • unarchivedReturned to CRAN
    2023-11-20
  • 1.3-6
    record
    2023-11-20 · diff ↗
  • archivedRemoved from CRAN
    2023-09-13
    issues were not corrected despite reminders
  • 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
  • 1.3-4
    record
    2021-03-22 · diff ↗
  • 1.3-2
    record
    2020-05-10 · diff ↗
  • R
    R 4.0.0 released · 2020-04-24
Show 24 earlier eventsHide 24 earlier events
  • R
    R 3.6.0 released · 2019-04-26
  • 1.3-0
    record
    2018-06-12 · diff ↗
  • R
    R 3.5.0 released · 2018-04-23
  • R
    R 3.4.0 released · 2017-04-21
  • R
    R 3.3.0 released · 2016-05-03
  • R
    R 3.2.0 released · 2015-04-16
  • R
    R 3.1.0 released · 2014-04-10
  • 1.2-2
    record
    2013-11-24 · diff ↗
  • R
    R 3.0.0 released · 2013-04-03
  • R
    R 2.15.0 released · 2012-03-30
  • 1.0-10
    record
    2012-02-21 · diff ↗ ·
    added 1 export
    pattern:.
  • R
    R 2.14.0 released · 2011-10-31
  • 1.0-8
    record
    2011-04-24 · diff ↗
  • R
    R 2.13.0 released · 2011-04-13
  • 1.0-5
    record
    2011-04-10 · diff ↗
  • 1.0-4
    record
    2011-03-24 · diff ↗
  • R
    R 2.12.0 released · 2010-10-15
  • R
    R 2.11.0 released · 2010-04-22
  • R
    R 2.10.0 released · 2009-10-26
  • 1.0.3
    record
    2009-06-22 · diff ↗
  • R
    R 2.9.0 released · 2009-04-17
  • R
    R 2.8.0 released · 2008-10-20
  • 1.0.2
    record
    2008-08-17
  • R
    R 2.7.0 released · 2008-04-22

Package metadata

First published
2008-08-17
Total releases
15 / 18 yrs
License
GPL-2 OSI
Minimum R
≥ 4.1.0
Bundled data
1.6 KB / 4 files
Download size
263 KB
Appears in task views

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("bpca")

The package provides a citation file that builds its entry when R runs it. Run citation() to see it.

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 bpca version 1.5-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