Skip to content

nsprcomp

0.5.1-2

Non-Negative and Sparse PCA

1packages depend
5.7Kdownloads / year
92.2%test coverage
13/13checks pass

Overview

About
Maintained by Christian SiggFirst published 2013-04-166 releasesCRAN page ↗GitHub ↗

Two methods for performing a constrained principal component analysis (PCA), where non-negativity and/or sparsity constraints are enforced on the principal axes (PAs). The function 'nsprcomp' computes one principal component (PC) after the other. Each PA is optimized such that the corresponding PC has maximum additional variance not explained by the previous components. In contrast, the function 'nscumcomp' jointly computes all PCs such that the cumulative variance is maximal. Both functions have the same interface as the 'prcomp' function from the 'stats' package (plus some extra parameters), and both return the result of the analysis as an object of class 'nsprcomp', which inherits from 'prcomp'. See https://sigg-iten.ch/learningbits/2013/05/27/nsprcomp-is-on-cran/ and Sigg et al. (2008) doi:10.1145/1390156.1390277 for more details.

Install

Health

CRAN checks
13OK
Slowest check: 1.5 min · r-devel-windows-x86_64
Code health
Yes
Tests · ratio 0.75
92.2%
Coverage · measured lines
100%
Documentation · exports
1
Dependencies · direct
Check history
  • OK2026-08-05
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • NOTE2026-08-01
    12 OK · 1 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • OK2026-03-10
    14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMEYes · 846 wordsVignettesNopkgdown siteNoNEWSNoCode of conductNoContributing guideNo
Examples that run
100%
Documented parameters
73%
Return-value docs
60%
References docs
40%

Downloads

5.7K
CRAN downloads in the past year
Rank #7,621 · ~16/day · ~472/mo
Daily download trend is not available in this view yet.
31230 days
1.1K90 days
5.7K1 year
Compare downloads with other packages →
Also on108 r2u11 autocran1K conda_forge73 c2d4u

Repository

Repository
9Stars
6Forks
0Open issues
0Open PRs
0Releases
36Commits
1Contributors
36 commits · Last activity 2018-06-05

Stars over time

2020-06-23 · 92026-07-07 · 9

Repository practices

Upstream repositoryBeta

Checks run against github.com/chrsigg/nsprcomp on 2026-08-23.

No development-tooling practices detected in the upstream repository.

How this is detected·Detection ruleset v1 (2026-07-18)

Dependencies

Declared dependencies
2 external dependencies (excludes base and recommended)
Depends (1)
R >= 3.4.0
Imports (1)
stats
LinkingTo (0)
none
Suggests (3)
Enhances (0)
none
Reverse dependencies
1direct
0indirect

Code & Tests

People & History

People (2)
Maintainer (1)
Author, Maintainer · added in 0.3
Authors (1)
Author, Maintainer · added in 0.3
Contributors (1)
Contributor
Package Timeline

6 releases. Pick two to compare their code metrics. R releases are shown for context.

  • 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
  • R
    R 4.0.0 released · 2020-04-24
  • R
    R 3.6.0 released · 2019-04-26
  • 0.5.1-2Latest
    2018-06-05 · current release · 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
  • 0.5
    2014-07-17 · diff ↗
  • R
    R 3.1.0 released · 2014-04-10
  • 0.4.1
    2013-09-22 · diff ↗
Show 4 earlier events
  • 0.4
    2013-09-19 · diff ↗
  • 0.3
    2013-05-29 · diff ↗
  • 0.2
    2013-04-16
  • R
    R 3.0.0 released · 2013-04-03

Package metadata

First published
2013-04-16
Total releases
6 / 13 yrs
License
GPL (>= 2) OSI
Minimum R
≥ 3.4.0
Download size
20 KB
Installed size
not tracked yet
With dependencies
not tracked yet
Appears in task views

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("nsprcomp")
Sigg, C., & R Core team. (2018). nsprcomp: Non-Negative and Sparse PCA (Version 0.5.1-2) [Computer software]. https://doi.org/10.32614/CRAN.package.nsprcomp

This is what citation() produces when a package has no citation file of its own. If it prints something else, use that.

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

From data release v2026-08-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