R Observatory
Search

sparsepca

0.1.2CRAN

Sparse Principal Component Analysis (SPCA)

install.packages("sparsepca")
CRAN checks, method
OKnotes on 2 of 13
CRAN 30-day downloads, method
2,970+26.8% up on the 30 days before, the better direction
Test coverage, method
0%of lines run by tests

Sparse principal component analysis (SPCA) attempts to find sparse weight vectors (loadings), i.e., a weight vector with only a few 'active' (nonzero) values. This approach provides better interpretability for the principal components in high-dimensional data settings.

Full description

Sparse principal component analysis (SPCA) attempts to find sparse weight vectors (loadings), i.e., a weight vector with only a few 'active' (nonzero) values. This approach provides better interpretability for the principal components in high-dimensional data settings. This is, because the principal components are formed as a linear combination of only a few of the original variables. This package provides efficient routines to compute SPCA. Specifically, a variable projection solver is used to compute the sparse solution. In addition, a fast randomized accelerated SPCA routine and a robust SPCA routine is provided. Robust SPCA allows to capture grossly corrupted entries in the data. The methods are discussed in detail by N. Benjamin Erichson et al. (2018) <arXiv:1804.00341>.

Maintainer
N. Benjamin Erichson
Licence
GPL (>= 3)
Latest release
11 Apr 2018
First release
11 Apr 2018

Compare with another package

More details
Releases
1
Needs compilation
No
LazyData
true
RoxygenNote
6.0.1
Subjects (1) Method, Subjects
Cite

Package

Run in R for the authors' preferred citation:

citation("sparsepca")

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

From data release v2026-10-28, which the citation names so these numbers can be found later.

No warnings or errors. 2 of 13 check platforms have notes.

  • r-devel-linux-x86_64-debian-clang

    The unreleased R on Linux, x86_64, debian-clang

    Note

    Version checked
    0.1.2
    Time taken
    60 s

    CRAN incoming feasibility: Note

    Maintainer: ‘N. Benjamin Erichson <erichson@uw.edu>’

    Full output

  • r-devel-linux-x86_64-debian-gcc

    The unreleased R on Linux, x86_64, debian-gcc

    Note

    Version checked
    0.1.2
    Time taken
    46 s

    CRAN incoming feasibility: Note

    Maintainer: ‘N. Benjamin Erichson <erichson@uw.edu>’

    Full output

  • r-devel-linux-x86_64-fedora-clang

    The unreleased R on Linux, x86_64, fedora-clang

    OK

    Version checked
    0.1.2
    Time taken
    62 s
  • r-devel-linux-x86_64-fedora-gcc

    The unreleased R on Linux, x86_64, fedora-gcc

    OK

    Version checked
    0.1.2
    Time taken
    40 s
  • r-devel-windows-x86_64

    The unreleased R on Windows, x86_64

    OK

    Version checked
    0.1.2
    Time taken
    75 s
  • r-oldrel-macos-arm64

    The previous release of R on macOS, arm64

    OK

    Version checked
    0.1.2
  • r-oldrel-macos-x86_64

    The previous release of R on macOS, x86_64

    OK

    Version checked
    0.1.2
    Time taken
    81 s
  • r-oldrel-windows-x86_64

    The previous release of R on Windows, x86_64

    OK

    Version checked
    0.1.2
    Time taken
    85 s
  • r-patched-linux-x86_64

    The patched release of R on Linux, x86_64

    OK

    Version checked
    0.1.2
    Time taken
    57 s
  • r-release-linux-x86_64

    The current release of R on Linux, x86_64

    OK

    Version checked
    0.1.2
    Time taken
    57 s
  • r-release-macos-arm64

    The current release of R on macOS, arm64

    OK

    Version checked
    0.1.2
    Time taken
    18 s
  • r-release-macos-x86_64

    The current release of R on macOS, x86_64

    OK

    Version checked
    0.1.2
    Time taken
    67 s
  • r-release-windows-x86_64

    The current release of R on Windows, x86_64

    OK

    Version checked
    0.1.2
    Time taken
    73 s
  • 2 Note
  • 11 OK
Check output (1)

CRAN incoming feasibility, Note on 2 platforms

Maintainer: ‘N. Benjamin Erichson <erichson@uw.edu>’

No Authors@R field in DESCRIPTION.
Please add one, modifying
  Authors@R: c(person(given = c("N.", "Benjamin"),
                      family = "Erichson",
                      role = c("aut", "cre"),
                      email = "erichson@uw.edu"),
               person(given = "Peng",
                      family = "Zheng",
                      role = "aut"),
               person(given = "Sasha",
                      family = "Aravkin",
                      role = "aut"))
as necessary.

The Description field contains
  Erichson et al. (2018) <arXiv:1804.00341>.
Please refer to arXiv e-prints via their arXiv DOI <doi:10.48550/arXiv.YYMM.NNNNN>.

Check results on CRAN

Total downloads in the last 30 days
3,295+32.1% up on the 30 days before, the better directionIt is the sum of 4 channels: CRAN, r2u, autoCRAN and conda-forge.

CRAN rank

2,100 of 26,530

CRAN

2,970 downloads in the last 30 days

Rank
2,100 of 26,530
Change
+26.8% up on the 30 days before, the better direction

It is in the total. Take it out

r2u

86 downloads in the last 30 days

Rank
2,491 of 30,526
Change
+291% up on the 30 days before, the better direction

It is in the total. Take it out

autoCRAN

3 downloads in the last 30 days

Rank
17,776 of 29,212
Change
−40% down on the 30 days before, the worse direction

It is in the total. Take it out

conda-forge

236 downloads in the last 30 days

Rank
2,282 of 3,828
Change
+88.8% up on the 30 days before, the better direction

It is in the total. Take it out

Over time

Compare downloads

Needs
1
Dependent packages
4
Suggested by
2
Needs (1)
Installing it adds
1 package, 3.3 MB of source
Of those, need compilation
0
Dependent packages (4)
PackageTitleDownloads in 30 days
robCompositionsCompositional Data Analysis1,115
clusterabilityPerforms Tests for Cluster Tendency of a Data Set381
SparseBiplots'HJ-Biplot' using Different Ways of Penalization Plotting with 'ggplot2'259
categoryEncodingsCategory Variable Encodings251
Functions
12
Public exports
3
Lines of R code
985
Median complexity
1
Functions (12)
Size and composition

Lines by kind (1,658)

KindLinesShare
R code98559%
Tests26816%
Documentation40524%

Lines by language

LanguageLinesShare
R1,25376%
Rd40524%

Languages are counted from file extensions.

Files
12
R functions
12
Object systems
S3: 9 methods
Complexity
Median
1
Mean
4.33
Highest
15
Median lines per function
18
About complexity

Cyclomatic complexity counts the independent paths through a function: 1 is a straight line, higher is harder to test. R functions only.

Call graph figures
R functions
12
Calls
0
Unconnected
12
Groups
0

The tests ran and coverage was measured.

Lines run by tests
0%
Expressions run by tests
0%
Test cases
19
Exports named in tests
100%
Coverage by file (3)
Coverage run
Lines counted
284
Lines the tests ran
0
Tests passed
Yes
Measured with
covr 3.6.5 on R 4.6.1
Test suite
Has tests
Yes
Test frameworks
testthat
Test cases
19
Lines of tests
268
Test lines per line of code
0.27
Exports documented
100%
Arguments documented
100%
Return value documented
100%
Help pages with examples
100%
Examples run in checks
100%
Other documentation
README
No
Release notes file
No
Help pages
3
Lines of documentation
405

erichson / spca on github.com

Stars
72no change on 30 days ago
Forks
10
Open issues
0
Last commit
18 Oct 2026
Activity
Commits
72
Open pull requests
0
Tagged releases
0
Latest tagged release
–
In development
Default branch at 1.0.0, ahead of CRAN 0.1.2 (checked 2026-10-25)
Issues closed in
6 days (median)
Pull requests closed in
0 days (median)
Pull requests merged
100%
Created
24 Mar 2018
Licence file reads as
–
Development practices (4)
KindFound
Continuous integrationGitHub Actions, R CMD check workflow, Travis CI (config file)
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
Governance and communityContributing guide

Method, repository practices

Across erichson

R releases
  • On CRAN
  • Release
VersionReleasedR
0.1.2 current11 Apr 20183.4.4