| Back to Mac ARM64 build report for BioC 3.18 |
|
This page was generated on 2024-04-18 11:32:09 -0400 (Thu, 18 Apr 2024).
| Hostname | OS | Arch (*) | R version | Installed pkgs |
|---|---|---|---|---|
| kjohnson1 | macOS 13.6.1 Ventura | arm64 | 4.3.3 (2024-02-29) -- "Angel Food Cake" | 4388 |
| Click on any hostname to see more info about the system (e.g. compilers) (*) as reported by 'uname -p', except on Windows and Mac OS X | ||||
| Package 551/2266 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||||
| destiny 3.16.0 (landing page) Philipp Angerer
| kjohnson1 | macOS 13.6.1 Ventura / arm64 | OK | OK | ERROR | OK | ||||||||
|
To the developers/maintainers of the destiny package: - Use the following Renviron settings to reproduce errors and warnings. - If 'R CMD check' started to fail recently on the Linux builder(s) over a missing dependency, add the missing dependency to 'Suggests:' in your DESCRIPTION file. See Renviron.bioc for more information. |
| Package: destiny |
| Version: 3.16.0 |
| Command: /Library/Frameworks/R.framework/Resources/bin/R CMD check --install=check:destiny.install-out.txt --library=/Library/Frameworks/R.framework/Resources/library --no-vignettes --timings destiny_3.16.0.tar.gz |
| StartedAt: 2024-04-17 11:49:11 -0400 (Wed, 17 Apr 2024) |
| EndedAt: 2024-04-17 11:54:09 -0400 (Wed, 17 Apr 2024) |
| EllapsedTime: 298.8 seconds |
| RetCode: 1 |
| Status: ERROR |
| CheckDir: destiny.Rcheck |
| Warnings: NA |
##############################################################################
##############################################################################
###
### Running command:
###
### /Library/Frameworks/R.framework/Resources/bin/R CMD check --install=check:destiny.install-out.txt --library=/Library/Frameworks/R.framework/Resources/library --no-vignettes --timings destiny_3.16.0.tar.gz
###
##############################################################################
##############################################################################
* using log directory ‘/Users/biocbuild/bbs-3.18-bioc-mac-arm64/meat/destiny.Rcheck’
* using R version 4.3.3 (2024-02-29)
* using platform: aarch64-apple-darwin20 (64-bit)
* R was compiled by
Apple clang version 14.0.0 (clang-1400.0.29.202)
GNU Fortran (GCC) 12.2.0
* running under: macOS Ventura 13.6.1
* using session charset: UTF-8
* using option ‘--no-vignettes’
* checking for file ‘destiny/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘destiny’ version ‘3.16.0’
* package encoding: UTF-8
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘destiny’ can be installed ... OK
* used C++ compiler: ‘Apple clang version 15.0.0 (clang-1500.0.40.1)’
* used SDK: ‘MacOSX11.3.sdk’
* checking C++ specification ... NOTE
Specified C++11: please drop specification unless essential
* checking installed package size ... OK
* checking package directory ... OK
* checking DESCRIPTION meta-information ... NOTE
Packages listed in more than one of Depends, Imports, Suggests, Enhances:
‘rgl’ ‘SingleCellExperiment’
A package should be listed in only one of these fields.
'LinkingTo' for ‘grDevices’ is unused as it has no 'include' directory
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking startup messages can be suppressed ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... NOTE
checkRd: (-1) Gene-Relevance.Rd:94: Escaped LaTeX specials: \_
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... NOTE
S3 methods shown with full name in documentation object 'Coercion methods':
‘fortify.DiffusionMap’ ‘fortify.DPT’
S3 methods shown with full name in documentation object 'plot.DPT':
‘plot.DPT’
S3 methods shown with full name in documentation object 'plot.DiffusionMap':
‘plot.DiffusionMap’
The \usage entries for S3 methods should use the \method markup and not
their full name.
See chapter ‘Writing R documentation files’ in the ‘Writing R
Extensions’ manual.
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking contents of ‘data’ directory ... OK
* checking data for non-ASCII characters ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking line endings in C/C++/Fortran sources/headers ... OK
* checking line endings in Makefiles ... OK
* checking compilation flags in Makevars ... OK
* checking for GNU extensions in Makefiles ... OK
* checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
* checking use of PKG_*FLAGS in Makefiles ... OK
* checking compiled code ... NOTE
Note: information on .o files is not available
* checking files in ‘vignettes’ ... OK
* checking examples ... OK
Examples with CPU (user + system) or elapsed time > 5s
user system elapsed
Gene-Relevance-plotting 6.347 0.521 6.92
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
Running ‘testthat.R’
ERROR
Running the tests in ‘tests/testthat.R’ failed.
Last 13 lines of output:
g8 = 0.351535562922557, g9 = 0.328191428189166, g10 = 0.429679381405003,
g11 = 0.337953505238208, g12 = 0.288900745629023, g13 = 0.405216105290068,
g14 = 0.375470293158044, g15 = 0.430853383569047, g16 = 0.413724889412212,
g17 = 0.38727024817684, g18 = 0.417563440534286, g19 = 0.343214032713634,
g20 = 0.425453944923356))`: function 'as_cholmod_sparse' not provided by package 'Matrix'
Backtrace:
▆
1. └─destiny:::pca_scores(test_matrix_sparse, test_n_pcs)
2. └─irlba::prcomp_irlba(x, n_pcs, center = center, scale. = scale)
3. ├─base::do.call(irlba, args = args)
4. └─irlba (local) `<fn>`(A = `<dgCMatrx[,20]>`, nv = 4L, center = `<dbl>`)
[ FAIL 2 | WARN 0 | SKIP 1 | PASS 65 ]
Error: Test failures
Execution halted
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes in ‘inst/doc’ ... OK
* checking running R code from vignettes ... SKIPPED
* checking re-building of vignette outputs ... SKIPPED
* checking PDF version of manual ... OK
* DONE
Status: 1 ERROR, 5 NOTEs
See
‘/Users/biocbuild/bbs-3.18-bioc-mac-arm64/meat/destiny.Rcheck/00check.log’
for details.
destiny.Rcheck/00install.out
##############################################################################
##############################################################################
###
### Running command:
###
### /Library/Frameworks/R.framework/Resources/bin/R CMD INSTALL destiny
###
##############################################################################
##############################################################################
* installing to library ‘/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library’
* installing *source* package ‘destiny’ ...
** using staged installation
** libs
using C++ compiler: ‘Apple clang version 15.0.0 (clang-1500.0.40.1)’
using C++11
using SDK: ‘MacOSX11.3.sdk’
clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/grDevices/include' -I/opt/R/arm64/include -ggdb -fPIC -falign-functions=64 -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o
In file included from RcppExports.cpp:4:
In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/RcppEigen.h:25:
In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/RcppEigenForward.h:29:
In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/Eigen/Sparse:26:
In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/Eigen/SparseCore:61:
/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/Eigen/src/SparseCore/TriangularSolver.h:273:13: warning: variable 'count' set but not used [-Wunused-but-set-variable]
Index count = 0;
^
In file included from RcppExports.cpp:4:
In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/RcppEigen.h:25:
In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/RcppEigenForward.h:29:
In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/Eigen/Sparse:29:
In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/Eigen/SparseLU:35:
/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h:78:9: warning: variable 'nsuper_et_post' set but not used [-Wunused-but-set-variable]
Index nsuper_et_post = 0; // Number of relaxed snodes in postordered etree
^
/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h:79:9: warning: variable 'nsuper_et' set but not used [-Wunused-but-set-variable]
Index nsuper_et = 0; // Number of relaxed snodes in the original etree
^
In file included from RcppExports.cpp:4:
In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/RcppEigen.h:25:
In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/RcppEigenForward.h:31:
In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/unsupported/Eigen/IterativeSolvers:46:
/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/unsupported/Eigen/src/IterativeSolvers/IDRS.h:72:10: warning: variable 'replacements' set but not used [-Wunused-but-set-variable]
Index replacements = 0;
^
In file included from RcppExports.cpp:4:
In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/RcppEigen.h:25:
In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/RcppEigenForward.h:37:
In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/unsupported/Eigen/SparseExtra:45:
/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/unsupported/Eigen/src/SparseExtra/MarketIO.h:246:7: warning: variable 'count' set but not used [-Wunused-but-set-variable]
int count = 0;
^
5 warnings generated.
clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/grDevices/include' -I/opt/R/arm64/include -ggdb -fPIC -falign-functions=64 -Wall -g -O2 -c censoring.cpp -o censoring.o
In file included from censoring.cpp:7:
In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/RcppEigen.h:25:
In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/RcppEigenForward.h:29:
In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/Eigen/Sparse:26:
In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/Eigen/SparseCore:61:
/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/Eigen/src/SparseCore/TriangularSolver.h:273:13: warning: variable 'count' set but not used [-Wunused-but-set-variable]
Index count = 0;
^
In file included from censoring.cpp:7:
In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/RcppEigen.h:25:
In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/RcppEigenForward.h:29:
In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/Eigen/Sparse:29:
In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/Eigen/SparseLU:35:
/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h:78:9: warning: variable 'nsuper_et_post' set but not used [-Wunused-but-set-variable]
Index nsuper_et_post = 0; // Number of relaxed snodes in postordered etree
^
/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h:79:9: warning: variable 'nsuper_et' set but not used [-Wunused-but-set-variable]
Index nsuper_et = 0; // Number of relaxed snodes in the original etree
^
In file included from censoring.cpp:7:
In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/RcppEigen.h:25:
In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/RcppEigenForward.h:31:
In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/unsupported/Eigen/IterativeSolvers:46:
/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/unsupported/Eigen/src/IterativeSolvers/IDRS.h:72:10: warning: variable 'replacements' set but not used [-Wunused-but-set-variable]
Index replacements = 0;
^
In file included from censoring.cpp:7:
In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/RcppEigen.h:25:
In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/RcppEigenForward.h:37:
In file included from /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/unsupported/Eigen/SparseExtra:45:
/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include/unsupported/Eigen/src/SparseExtra/MarketIO.h:246:7: warning: variable 'count' set but not used [-Wunused-but-set-variable]
int count = 0;
^
censoring.cpp:60:15: warning: variable 'm0' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
} else if (!one_uncertain && one_missing) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
censoring.cpp:71:20: note: uninitialized use occurs here
* ( std::erfc((m0-v) / sigma) - std::erfc((m1-v) / sigma) )
^~
censoring.cpp:60:11: note: remove the 'if' if its condition is always true
} else if (!one_uncertain && one_missing) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
censoring.cpp:60:15: warning: variable 'm0' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized]
} else if (!one_uncertain && one_missing) {
^~~~~~~~~~~~~~
censoring.cpp:71:20: note: uninitialized use occurs here
* ( std::erfc((m0-v) / sigma) - std::erfc((m1-v) / sigma) )
^~
censoring.cpp:60:15: note: remove the '&&' if its condition is always true
} else if (!one_uncertain && one_missing) {
^~~~~~~~~~~~~~~~~
censoring.cpp:55:13: note: initialize the variable 'm0' to silence this warning
double m0, m1;
^
= 0.0
censoring.cpp:60:15: warning: variable 'm1' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
} else if (!one_uncertain && one_missing) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
censoring.cpp:71:48: note: uninitialized use occurs here
* ( std::erfc((m0-v) / sigma) - std::erfc((m1-v) / sigma) )
^~
censoring.cpp:60:11: note: remove the 'if' if its condition is always true
} else if (!one_uncertain && one_missing) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
censoring.cpp:60:15: warning: variable 'm1' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized]
} else if (!one_uncertain && one_missing) {
^~~~~~~~~~~~~~
censoring.cpp:71:48: note: uninitialized use occurs here
* ( std::erfc((m0-v) / sigma) - std::erfc((m1-v) / sigma) )
^~
censoring.cpp:60:15: note: remove the '&&' if its condition is always true
} else if (!one_uncertain && one_missing) {
^~~~~~~~~~~~~~~~~
censoring.cpp:55:17: note: initialize the variable 'm1' to silence this warning
double m0, m1;
^
= 0.0
censoring.cpp:60:15: warning: variable 'use_d' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
} else if (!one_uncertain && one_missing) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
censoring.cpp:66:21: note: uninitialized use occurs here
const double v = use_d ? d : c;
^~~~~
censoring.cpp:60:11: note: remove the 'if' if its condition is always true
} else if (!one_uncertain && one_missing) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
censoring.cpp:60:15: warning: variable 'use_d' is used uninitialized whenever '&&' condition is false [-Wsometimes-uninitialized]
} else if (!one_uncertain && one_missing) {
^~~~~~~~~~~~~~
censoring.cpp:66:21: note: uninitialized use occurs here
const double v = use_d ? d : c;
^~~~~
censoring.cpp:60:15: note: remove the '&&' if its condition is always true
} else if (!one_uncertain && one_missing) {
^~~~~~~~~~~~~~~~~
censoring.cpp:18:12: note: initialize the variable 'use_d' to silence this warning
bool use_d;
^
= false
11 warnings generated.
clang++ -arch arm64 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/RcppEigen/include' -I'/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/grDevices/include' -I/opt/R/arm64/include -ggdb -fPIC -falign-functions=64 -Wall -g -O2 -c utils.cpp -o utils.o
clang++ -arch arm64 -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -L/Library/Frameworks/R.framework/Resources/lib -L/opt/R/arm64/lib -o destiny.so RcppExports.o censoring.o utils.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/00LOCK-destiny/00new/destiny/libs
** R
** data
** demo
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (destiny)
destiny.Rcheck/tests/testthat.Rout.fail
R version 4.3.3 (2024-02-29) -- "Angel Food Cake"
Copyright (C) 2024 The R Foundation for Statistical Computing
Platform: aarch64-apple-darwin20 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(testthat)
> library(destiny)
>
> test_check('destiny')
[ FAIL 2 | WARN 0 | SKIP 1 | PASS 65 ]
══ Skipped tests (1) ═══════════════════════════════════════════════════════════
• Not yet stable (1): 'test_gr.r:23:2'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test_pca.r:30:2'): PCA works sparse and dense data ──────────────────
Error in `(function (A, nv = 5, nu = nv, maxit = 1000, work = nv + 7, reorth = TRUE,
tol = 1e-05, v = NULL, right_only = FALSE, verbose = FALSE,
scale = NULL, center = NULL, shift = NULL, mult = NULL, fastpath = TRUE,
svtol = tol, smallest = FALSE, ...)
{
ropts <- options(warn = 1)
mflag <- new.env()
mflag$flag <- FALSE
on.exit(options(ropts))
interchange <- FALSE
eps <- .Machine$double.eps
mcall <- as.list(match.call())
random <- eval(mcall[["rng"]])
if (is.null(random))
random <- rnorm
maxritz <- eval(mcall[["maxritz"]])
if (is.null(maxritz))
maxritz <- 3
eps2 <- eval(mcall[["invariant_subspace_tolerance"]])
if (is.null(eps2))
eps2 <- eps^(4/5)
du <- eval(mcall[["du"]])
dv <- eval(mcall[["dv"]])
ds <- eval(mcall[["ds"]])
deflate <- is.null(du) + is.null(ds) + is.null(dv)
if (is.logical(scale) && !scale)
scale <- NULL
if (is.logical(shift) && !shift)
shift <- NULL
if (is.logical(center) && !center)
center <- NULL
if (smallest)
fastpath <- FALSE
if (any(dim(A) > 2^32 - 1))
fastpath <- FALSE
if (deflate == 3) {
deflate <- FALSE
}
else if (deflate == 0) {
deflate <- TRUE
warning("The deflation options have been deprecated. Please modify your code to not use them.")
if (length(ds) > 1)
stop("deflation limited to one dimension")
if (!is.null(dim(du)))
du <- du[, 1]
if (!is.null(dim(dv)))
dv <- dv[, 1]
}
else stop("all three du ds dv parameters must be specified for deflation")
if (!is.null(center)) {
if (is.logical(center) && center)
center <- colMeans(A)
if (deflate)
stop("the center parameter can't be specified together with deflation parameters")
if (length(center) != ncol(A))
stop("center must be a vector of length ncol(A)")
if (fastpath && !right_only)
du <- NULL
else du <- 1
ds <- 1
dv <- center
deflate <- TRUE
}
if ("integer" == typeof(A))
A <- A + 0
iscomplex <- is.complex(A)
m <- nrow(A)
n <- ncol(A)
if (is.null(nu))
nu <- nv
if (!is.null(mult) && deflate)
stop("the mult parameter can't be specified together with deflation parameters")
missingmult <- FALSE
if (is.null(mult)) {
missingmult <- TRUE
mult <- `%*%`
}
k <- max(nu, nv)
if (k <= 0)
stop("max(nu, nv) must be positive")
if (k > min(m - 1, n - 1))
stop("max(nu, nv) must be strictly less than min(nrow(A), ncol(A))")
if (k >= 0.5 * min(m, n)) {
warning("You're computing too large a percentage of total singular values, use a standard svd instead.")
}
if (work <= 1)
stop("work must be greater than 1")
if (tol < 0)
stop("tol must be non-negative")
if (maxit <= 0)
stop("maxit must be positive")
if (work <= k && !right_only)
work <- k + 1
if (work >= min(n, m)) {
work <- min(n, m)
if (work <= k) {
k <- work - 1
warning("Requested subspace dimension too large! Reduced to ",
k)
}
}
k_org <- k
w_dim <- work
if (right_only) {
w_dim <- 1
fastpath <- FALSE
}
if (n > m && smallest) {
interchange <- TRUE
temp <- m
m <- n
n <- temp
}
if (verbose) {
message("Working dimension size ", work)
}
if (min(m, n) < 6) {
A <- as.matrix(A)
if (verbose)
message("Tiny problem detected, using standard `svd` function.")
if (!is.null(scale)) {
A <- sweep(A, 2, scale, "/")
dv <- dv/scale
}
if (!is.null(shift))
A <- A + diag(shift, nrow(A), ncol(A))
if (deflate) {
if (is.null(du))
du <- rep(1, nrow(A))
A <- A - (ds * du) %*% t(dv)
}
s <- svd(A)
if (smallest) {
return(list(d = tail(s$d, k), u = s$u[, tail(seq(ncol(s$u)),
k), drop = FALSE], v = s$v[, tail(seq(ncol(s$v),
k)), drop = FALSE], iter = 0, mprod = 0))
}
return(list(d = s$d[1:k], u = s$u[, 1:nu, drop = FALSE],
v = s$v[, 1:nv, drop = FALSE], iter = 0, mprod = 0))
}
if (deflate)
fastpath <- fastpath && is.null(du)
fastpath <- fastpath && (("Matrix" %in% attributes(class(A)) &&
("dgCMatrix" %in% class(A))) || "matrix" %in% class(A))
if (fastpath && missingmult && !iscomplex && !right_only) {
RESTART <- 0L
RV <- RW <- RS <- NULL
if (is.null(v)) {
v <- random(n)
if (verbose)
message("Initializing starting vector v with samples from standard normal distribution.\nUse `set.seed` first for reproducibility.")
}
else if (is.list(v)) {
if (is.null(v$v) || is.null(v$d) || is.null(v$u))
stop("restart requires left and right singular vectors")
if (max(nu, nv) <= min(ncol(v$u), ncol(v$v)))
return(v)
RESTART <- as.integer(length(v$d))
RND <- random(n)
RND <- orthog(RND, v$v)
RV <- cbind(v$v, RND/norm2(RND))
RW <- v$u
RS <- v$d
v <- NULL
}
SP <- ifelse(is.matrix(A), 0L, 1L)
if (verbose)
message("irlba: using fast C implementation")
SCALE <- NULL
SHIFT <- NULL
CENTER <- NULL
if (!is.null(scale)) {
if (length(scale) != ncol(A))
stop("scale length must match number of matrix columns")
SCALE <- as.double(scale)
}
if (!is.null(shift)) {
if (length(shift) != 1)
stop("shift length must be 1")
SHIFT <- as.double(shift)
}
if (deflate) {
if (length(center) != ncol(A))
stop("the centering vector length must match the number of matrix columns")
CENTER <- as.double(center)
}
ans <- .Call(C_IRLB, A, as.integer(k), as.double(v),
as.integer(work), as.integer(maxit), as.double(tol),
as.double(eps2), as.integer(SP), as.integer(RESTART),
RV, RW, RS, SCALE, SHIFT, CENTER, as.double(svtol))
if (ans[[6]] == 0 || ans[[6]] == -2) {
names(ans) <- c("d", "u", "v", "iter", "mprod", "err")
ans$u <- matrix(head(ans$u, m * nu), nrow = m, ncol = nu)
ans$v <- matrix(head(ans$v, n * nv), nrow = n, ncol = nv)
if (tol * ans$d[1] < eps)
warning("convergence criterion below machine epsilon")
if (ans[[6]] == -2)
warning("did not converge--results might be invalid!; try increasing work or maxit")
return(ans[-6])
}
errors <- c("invalid dimensions", "didn't converge",
"out of memory", "starting vector near the null space",
"linear dependency encountered")
erridx <- abs(ans[[6]])
if (erridx > 1)
warning("fast code path error ", errors[erridx],
"; re-trying with fastpath=FALSE.", immediate. = TRUE)
}
W <- matrix(0, m, w_dim)
F <- matrix(0, n, 1)
restart <- FALSE
if (is.list(v)) {
if (is.null(v$v) || is.null(v$d) || is.null(v$u))
stop("restart requires left and right singular vectors")
if (max(nu, nv) <= min(ncol(v$u), ncol(v$v)))
return(v)
right_only <- FALSE
W[, 1:ncol(v$u)] <- v$u
d <- v$d
V <- matrix(0, n, work)
V[, 1:ncol(v$v)] <- v$v
restart <- TRUE
}
else if (is.null(v)) {
V <- matrix(0, n, work)
V[, 1] <- random(n)
}
else {
V <- matrix(0, n, work)
V[1:length(v)] <- v
}
B <- NULL
Bsz <- NULL
eps23 <- eps^(2/3)
iter <- 1
mprod <- 0
R_F <- NULL
sqrteps <- sqrt(eps)
Smax <- 1
Smin <- NULL
lastsv <- c()
if (restart) {
B <- cbind(diag(d), 0)
k <- length(d)
F <- random(n)
F <- orthog(F, V[, 1:k])
V[, k + 1] <- F/norm2(F)
}
if (deflate && is.null(du))
du <- 1
while (iter <= maxit) {
j <- 1
if (iter == 1 && !restart) {
V[, 1] <- V[, 1]/norm2(V[, 1])
}
else j <- k + 1
j_w <- ifelse(w_dim > 1, j, 1)
VJ <- V[, j]
if (!is.null(scale)) {
VJ <- VJ/scale
}
if (interchange)
avj <- mult(VJ, A)
else avj <- mult(A, VJ)
W[, j_w] <- as.vector(avj)
mprod <- mprod + 1
if (!is.null(shift)) {
W[, j_w] <- W[, j_w] + shift * VJ
}
if (deflate) {
W[, j_w] <- W[, j_w] - ds * drop(cross(dv, VJ)) *
du
}
if (iter != 1 && w_dim > 1 && reorth) {
W[, j] <- orthog(W[, j, drop = FALSE], W[, 1:(j -
1), drop = FALSE])
}
S <- norm2(W[, j_w, drop = FALSE])
if (is.na(S) || S < eps2 && j == 1)
stop("starting vector near the null space")
if (is.na(S) || S < eps2) {
if (verbose)
message_once("invariant subspace found", flag = mflag)
W[, j_w] <- random(nrow(W))
if (w_dim > 1)
W[, j] <- orthog(W[, j], W[, 1:(j - 1)])
W[, j_w] <- W[, j_w]/norm2(W[, j_w])
S <- 0
}
else W[, j_w] <- W[, j_w]/S
while (j <= work) {
j_w <- ifelse(w_dim > 1, j, 1)
if (iscomplex) {
if (interchange)
F <- Conj(t(drop(mult(A, Conj(drop(W[, j_w]))))))
else F <- Conj(t(drop(mult(Conj(drop(W[, j_w])),
A))))
}
else {
if (interchange)
F <- t(drop(mult(A, drop(W[, j_w]))))
else F <- t(drop(mult(drop(W[, j_w]), A)))
}
if (!is.null(shift))
F <- F + shift * W[, j_w]
if (!is.null(scale))
F <- F/scale
if (deflate) {
sub <- sum(W[, j_w]) * dv
if (!is.null(scale))
sub <- sub/scale
F <- F - sub
}
mprod <- mprod + 1
F <- drop(F - S * V[, j])
F <- orthog(F, V[, 1:j, drop = FALSE])
if (j + 1 <= work) {
R <- norm2(F)
if (R < eps2) {
if (verbose)
message_once("invariant subspace found",
flag = mflag)
F <- matrix(random(dim(V)[1]), dim(V)[1], 1)
F <- orthog(F, V[, 1:j, drop = FALSE])
V[, j + 1] <- F/norm2(F)
R <- 0
}
else V[, j + 1] <- F/R
if (is.null(B))
B <- cbind(S, R)
else B <- rbind(cbind(B, 0), c(rep(0, ncol(B) -
1), S, R))
jp1_w <- ifelse(w_dim > 1, j + 1, 1)
w_old <- W[, j_w]
VJP1 <- V[, j + 1]
if (!is.null(scale)) {
VJP1 <- VJP1/scale
}
if (interchange)
W[, jp1_w] <- drop(mult(drop(VJP1), A))
else W[, jp1_w] <- drop(mult(A, drop(VJP1)))
mprod <- mprod + 1
if (!is.null(shift)) {
W[, jp1_w] <- W[, jp1_w] + shift * VJP1
}
if (deflate) {
W[, jp1_w] <- W[, jp1_w] - ds * drop(cross(dv,
VJP1)) * du
}
W[, jp1_w] <- W[, jp1_w] - R * w_old
if (reorth && w_dim > 1)
W[, j + 1] <- orthog(W[, j + 1], W[, 1:j])
S <- norm2(W[, jp1_w])
if (S < eps2) {
if (verbose)
message_once("invariant subspace found",
flag = mflag)
W[, jp1_w] <- random(nrow(W))
if (w_dim > 1)
W[, j + 1] <- orthog(W[, j + 1], W[, 1:j])
W[, jp1_w] <- W[, jp1_w]/norm2(W[, jp1_w])
S <- 0
}
else W[, jp1_w] <- W[, jp1_w]/S
}
else {
B <- rbind(B, c(rep(0, j - 1), S))
}
j <- j + 1
}
Bsz <- nrow(B)
R_F <- norm2(F)
F <- F/R_F
Bsvd <- svd(B)
if (iter == 1) {
Smax <- Bsvd$d[1]
Smin <- Bsvd$d[Bsz]
}
else {
Smax <- max(Smax, Bsvd$d[1])
Smin <- min(Smin, Bsvd$d[Bsz])
}
Smax <- max(eps23, Smax)
if (!reorth && Smin/Smax < sqrteps) {
warning("The matrix is ill-conditioned. Basis will be reorthogonalized.")
reorth <- TRUE
}
if (smallest) {
jj <- seq(ncol(Bsvd$u), 1, by = -1)
Bsvd$u <- Bsvd$u[, jj]
Bsvd$d <- Bsvd$d[jj]
Bsvd$v <- Bsvd$v[, jj]
}
R <- R_F * Bsvd$u[Bsz, , drop = FALSE]
ct <- convtests(Bsz, tol, k_org, Bsvd, abs(R), k, Smax,
lastsv, svtol, maxritz, work, S)
if (verbose) {
message("iter= ", iter, ", mprod= ", mprod, ", sv[",
k_org, "]=", sprintf("%.2e", Bsvd$d[k_org]),
", %change=", sprintf("%.2e", (Bsvd$d[k_org] -
lastsv[k_org])/Bsvd$d[k_org]), ", k=", ct$k)
}
lastsv <- Bsvd$d
k <- ct$k
if (ct$converged)
break
if (iter >= maxit)
break
if (smallest && (Smin/Smax > sqrteps)) {
Bsvd2.d <- Bsvd$d
Bsvd2.d <- diag(Bsvd2.d, nrow = length(Bsvd2.d))
Bsvd2 <- svd(cbind(Bsvd2.d, t(R)))
jj <- seq(ncol(Bsvd2$u), 1, by = -1)
Bsvd2$u <- Bsvd2$u[, jj]
Bsvd2$d <- Bsvd2$d[jj]
Bsvd2$v <- Bsvd2$v[, jj]
Bsvd$d <- Bsvd2$d
Bsvd$u <- Bsvd$u %*% Bsvd2$u
Bsvd$v <- cbind(rbind(Bsvd$v, rep(0, Bsz)), c(rep(0,
Bsz), 1)) %*% Bsvd2$v
V_B_last <- Bsvd$v[Bsz + 1, 1:k]
s <- R_F * solve(B, cbind(c(rep(0, Bsz - 1), 1)))
Bsvd$v <- Bsvd$v[1:Bsz, , drop = FALSE] + s %*% Bsvd$v[Bsz +
1, ]
qrv <- qr(cbind(rbind(Bsvd$v[, 1:k], 0), rbind(-s,
1)))
Bsvd$v <- qr.Q(qrv)
R <- qr.R(qrv)
V[, 1:(k + 1)] <- cbind(V, F) %*% Bsvd$v
UT <- t(R[1:(k + 1), 1:k] + R[, k + 1] %*% rbind(V_B_last))
B <- diag(Bsvd$d[1:k], nrow = k) %*% (UT * upper.tri(UT,
diag = TRUE))[1:k, 1:(k + 1)]
}
else {
V[, 1:(k + dim(F)[2])] <- cbind(V[, 1:(dim(Bsvd$v)[1]),
drop = FALSE] %*% Bsvd$v[, 1:k], F)
B <- cbind(diag(Bsvd$d[1:k], nrow = k), R[1:k])
}
if (w_dim > 1) {
W[, 1:k] <- W[, 1:(dim(Bsvd$u)[1]), drop = FALSE] %*%
Bsvd$u[, 1:k]
}
iter <- iter + 1
}
if (!ct$converged)
warning("did not converge--results might be invalid!; try increasing maxit or work")
d <- Bsvd$d[1:k_org]
if (!right_only) {
u <- W[, 1:(dim(Bsvd$u)[1]), drop = FALSE] %*% Bsvd$u[,
1:k_org, drop = FALSE]
}
v <- V[, 1:(dim(Bsvd$v)[1]), drop = FALSE] %*% Bsvd$v[, 1:k_org,
drop = FALSE]
if (smallest) {
reverse <- seq(length(d), 1)
d <- d[reverse]
if (!right_only)
u <- u[, reverse]
v <- v[, reverse]
}
if (tol * d[1] < eps)
warning("convergence criterion below machine epsilon")
if (right_only)
return(list(d = d, v = v[, 1:nv, drop = FALSE], iter = iter,
mprod = mprod))
return(list(d = d, u = u[, 1:nu, drop = FALSE], v = v[, 1:nv,
drop = FALSE], iter = iter, mprod = mprod))
})(A = new("dgCMatrix", i = c(0L, 1L, 5L, 7L, 10L, 11L, 14L,
15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 25L, 28L, 0L, 1L, 2L,
7L, 12L, 14L, 15L, 19L, 21L, 22L, 23L, 26L, 27L, 28L, 29L, 0L,
3L, 5L, 7L, 8L, 9L, 10L, 11L, 14L, 16L, 18L, 20L, 23L, 26L, 27L,
0L, 1L, 3L, 4L, 5L, 7L, 8L, 9L, 14L, 15L, 16L, 20L, 24L, 26L,
27L, 28L, 2L, 3L, 10L, 11L, 12L, 14L, 20L, 21L, 24L, 25L, 28L,
29L, 10L, 12L, 13L, 23L, 25L, 26L, 0L, 1L, 6L, 8L, 13L, 14L,
19L, 20L, 21L, 24L, 25L, 26L, 27L, 28L, 0L, 1L, 4L, 9L, 10L,
11L, 13L, 15L, 20L, 23L, 25L, 27L, 29L, 3L, 5L, 6L, 8L, 9L, 12L,
13L, 18L, 22L, 23L, 24L, 27L, 28L, 0L, 3L, 4L, 7L, 11L, 13L,
14L, 15L, 16L, 18L, 20L, 21L, 23L, 24L, 25L, 29L, 0L, 2L, 3L,
8L, 9L, 10L, 11L, 14L, 16L, 17L, 20L, 24L, 28L, 1L, 6L, 7L, 8L,
9L, 16L, 17L, 20L, 22L, 23L, 27L, 0L, 1L, 3L, 4L, 5L, 9L, 12L,
18L, 19L, 21L, 22L, 23L, 24L, 26L, 28L, 29L, 0L, 1L, 4L, 5L,
7L, 8L, 10L, 11L, 12L, 16L, 17L, 18L, 19L, 20L, 21L, 0L, 2L,
3L, 7L, 9L, 10L, 11L, 12L, 14L, 15L, 19L, 20L, 21L, 24L, 25L,
26L, 28L, 0L, 5L, 6L, 7L, 9L, 10L, 12L, 13L, 15L, 18L, 19L, 20L,
21L, 23L, 24L, 25L, 26L, 1L, 2L, 4L, 5L, 6L, 9L, 11L, 13L, 14L,
15L, 19L, 21L, 23L, 26L, 28L, 0L, 1L, 4L, 9L, 10L, 11L, 13L,
15L, 18L, 19L, 20L, 21L, 22L, 25L, 28L, 29L, 0L, 2L, 4L, 6L,
7L, 10L, 11L, 12L, 13L, 14L, 21L, 22L, 24L, 25L, 26L, 0L, 2L,
3L, 4L, 6L, 7L, 9L, 11L, 12L, 13L, 14L, 15L, 18L, 19L, 20L, 21L,
24L), p = c(0L, 17L, 32L, 47L, 63L, 75L, 81L, 95L, 108L, 121L,
137L, 150L, 161L, 177L, 192L, 209L, 226L, 241L, 257L, 272L, 289L
), Dim = c(30L, 20L), Dimnames = list(c("c1", "c2", "c3", "c4",
"c5", "c6", "c7", "c8", "c9", "c10", "c11", "c12", "c13", "c14",
"c15", "c16", "c17", "c18", "c19", "c20", "c21", "c22", "c23",
"c24", "c25", "c26", "c27", "c28", "c29", "c30"), c("g1", "g2",
"g3", "g4", "g5", "g6", "g7", "g8", "g9", "g10", "g11", "g12",
"g13", "g14", "g15", "g16", "g17", "g18", "g19", "g20")), x = c(0.640101045137271,
0.991838620044291, 0.754820944508538, 0.511169783771038, 0.595711996313184,
0.57487219828181, 0.642795492196456, 0.928615199634805, 0.598092422354966,
0.560900748008862, 0.526027723914012, 0.985095223877579, 0.507641822332516,
0.682788078673184, 0.601541217649356, 0.729309623362496, 0.746698269620538,
0.864544949028641, 0.614644971676171, 0.557159538846463, 0.529630602803081,
0.895094102947041, 0.779984889784828, 0.880619034869596, 0.723725946620107,
0.630414122482762, 0.840614554006606, 0.856131664710119, 0.895445425994694,
0.644315762910992, 0.741078648716211, 0.605303446529433, 0.903081611497328,
0.886450943304226, 0.877057543024421, 0.758103052387014, 0.724498892668635,
0.943724818294868, 0.547646587016061, 0.711743867723271, 0.927302088588476,
0.59057315881364, 0.840507032116875, 0.782851336989552, 0.516796836396679,
0.518576137488708, 0.562782935798168, 0.717935275984928, 0.961409936426207,
0.763222689507529, 0.947966354666278, 0.818634688388556, 0.649579460499808,
0.953355451114476, 0.953732650028542, 0.510125206550583, 0.923968471353874,
0.510959698352963, 0.854001502273604, 0.631420228397474, 0.689627848798409,
0.689413412474096, 0.554900623159483, 0.578353944001719, 0.910370304249227,
0.942957059247419, 0.761973861604929, 0.932909828843549, 0.603588067693636,
0.934691370232031, 0.523986077867448, 0.787540507735685, 0.702462512534112,
0.754705621628091, 0.620410033036023, 0.770737042883411, 0.527310776989907,
0.880319068906829, 0.981563460314646, 0.506939497077838, 0.68144251476042,
0.929253919748589, 0.673712232848629, 0.991099219536409, 0.813435208518058,
0.841351716779172, 0.719913988374174, 0.969208805356175, 0.624714189674705,
0.664618249749765, 0.996077371528372, 0.855082356370986, 0.953548396006227,
0.812305092345923, 0.782182115828618, 0.762151529546827, 0.986311589134857,
0.812131523853168, 0.582205270184204, 0.970162178855389, 0.98949983343482,
0.542130424408242, 0.676164050819352, 0.725405272562057, 0.784546229988337,
0.981018084799871, 0.847882149508223, 0.886458750581369, 0.837416569236666,
0.587035141419619, 0.836732269730419, 0.702778743347153, 0.69882453721948,
0.562176787760109, 0.928483226336539, 0.864807550329715, 0.564263842999935,
0.656162315513939, 0.97855406277813, 0.796836083987728, 0.831671715015545,
0.963312016334385, 0.925229935208336, 0.507035602582619, 0.659821025794372,
0.658877609064803, 0.954378136899322, 0.897848492022604, 0.943697054404765,
0.72369075124152, 0.781017540255561, 0.940308712190017, 0.993749226210639,
0.747635063482448, 0.792909023817629, 0.705859006382525, 0.695012246258557,
0.822793305618688, 0.514732652809471, 0.663010967662558, 0.932571928249672,
0.838384066708386, 0.879433296155185, 0.935712467646226, 0.537864922778681,
0.801687705563381, 0.739641745807603, 0.92051784065552, 0.609748935094103,
0.942505322396755, 0.964317037956789, 0.657828069292009, 0.578161916695535,
0.987101763952523, 0.603792401496321, 0.938413745490834, 0.715833283727989,
0.690256722969934, 0.95514673832804, 0.712540122447535, 0.863630566513166,
0.691927672130987, 0.760313281789422, 0.849457093048841, 0.946817819029093,
0.588419190375134, 0.877578062238172, 0.939136706059799, 0.517009826377034,
0.846245752647519, 0.554177061188966, 0.688275237567723, 0.658057553693652,
0.663342725252733, 0.969528166111559, 0.849552103783935, 0.756644907407463,
0.532601219369099, 0.874149660812691, 0.72776700463146, 0.716589478775859,
0.646067276829854, 0.541979279834777, 0.637908723205328, 0.829201063839719,
0.708975198445842, 0.92817754833959, 0.804390771314502, 0.758696807082742,
0.957249888917431, 0.993913878686726, 0.606440994655713, 0.62177327950485,
0.955675768665969, 0.653349443105981, 0.995965478708968, 0.561988092726097,
0.732718017650768, 0.870805552927777, 0.572170259663835, 0.906315261265263,
0.770653631538153, 0.821162318112329, 0.829324304359034, 0.654732875758782,
0.731371578993276, 0.907291416078806, 0.696196999400854, 0.644107228610665,
0.957636520732194, 0.827717769658193, 0.525305503746495, 0.667747627478093,
0.842589903390035, 0.737305467948318, 0.948938177432865, 0.646679189987481,
0.596448455704376, 0.52804887923412, 0.962333308532834, 0.708740051137283,
0.553475703578442, 0.778042529011145, 0.651940943440422, 0.830245703924447,
0.648550947429612, 0.814251750474796, 0.928777225781232, 0.749821664998308,
0.975657349685207, 0.974792463472113, 0.950951009057462, 0.934760116506368,
0.53306060587056, 0.538794299354777, 0.714717949740589, 0.62665484752506,
0.851667639799416, 0.768248430453241, 0.621076293755323, 0.634875798830763,
0.938176916679367, 0.857501537073404, 0.828534359810874, 0.689457366475835,
0.668050603941083, 0.90454664779827, 0.932808704674244, 0.792378755984828,
0.862034041201696, 0.685107505181804, 0.942074909573421, 0.675853760447353,
0.843120148405433, 0.567687397589907, 0.588066393043846, 0.751504168147221,
0.867238787235692, 0.798814549576491, 0.623435709392652, 0.587927932385355,
0.913784642005339, 0.671408327762038, 0.768144550733268, 0.522248276043683,
0.828075018012896, 0.52709619468078, 0.791456031380221, 0.77818130212836,
0.515526150586084, 0.59724048548378, 0.505843024002388, 0.919331770390272,
0.507374254753813, 0.820171616971493, 0.5983954181429, 0.559310270706192,
0.789094472071156, 0.970451730070636, 0.929743205895647, 0.900939270388335,
0.750882187858224, 0.676568772410974, 0.648013445781544, 0.530824364162982,
0.942704762332141, 0.71222455939278, 0.724490575492382, 0.783097670879215
), factors = list()), nv = 4L, center = c(g1 = 0.38593401365603,
g2 = 0.368623588730892, g3 = 0.369723228070264, g4 = 0.404341783265894,
g5 = 0.301798306289129, g6 = 0.144943745364435, g7 = 0.387550095422193,
g8 = 0.351535562922557, g9 = 0.328191428189166, g10 = 0.429679381405003,
g11 = 0.337953505238208, g12 = 0.288900745629023, g13 = 0.405216105290068,
g14 = 0.375470293158044, g15 = 0.430853383569047, g16 = 0.413724889412212,
g17 = 0.38727024817684, g18 = 0.417563440534286, g19 = 0.343214032713634,
g20 = 0.425453944923356))`: function 'as_cholmod_sparse' not provided by package 'Matrix'
Backtrace:
▆
1. └─destiny:::pca_scores(test_matrix_sparse, test_n_pcs) at test_pca.r:30:9
2. └─irlba::prcomp_irlba(x, n_pcs, center = center, scale. = scale)
3. ├─base::do.call(irlba, args = args)
4. └─irlba (local) `<fn>`(A = `<dgCMatrx[,20]>`, nv = 4L, center = `<dbl>`)
── Error ('test_pca.r:35:1'): PCA with sparse data does not densify ────────────
Error in `(function (A, nv = 5, nu = nv, maxit = 1000, work = nv + 7, reorth = TRUE,
tol = 1e-05, v = NULL, right_only = FALSE, verbose = FALSE,
scale = NULL, center = NULL, shift = NULL, mult = NULL, fastpath = TRUE,
svtol = tol, smallest = FALSE, ...)
{
ropts <- options(warn = 1)
mflag <- new.env()
mflag$flag <- FALSE
on.exit(options(ropts))
interchange <- FALSE
eps <- .Machine$double.eps
mcall <- as.list(match.call())
random <- eval(mcall[["rng"]])
if (is.null(random))
random <- rnorm
maxritz <- eval(mcall[["maxritz"]])
if (is.null(maxritz))
maxritz <- 3
eps2 <- eval(mcall[["invariant_subspace_tolerance"]])
if (is.null(eps2))
eps2 <- eps^(4/5)
du <- eval(mcall[["du"]])
dv <- eval(mcall[["dv"]])
ds <- eval(mcall[["ds"]])
deflate <- is.null(du) + is.null(ds) + is.null(dv)
if (is.logical(scale) && !scale)
scale <- NULL
if (is.logical(shift) && !shift)
shift <- NULL
if (is.logical(center) && !center)
center <- NULL
if (smallest)
fastpath <- FALSE
if (any(dim(A) > 2^32 - 1))
fastpath <- FALSE
if (deflate == 3) {
deflate <- FALSE
}
else if (deflate == 0) {
deflate <- TRUE
warning("The deflation options have been deprecated. Please modify your code to not use them.")
if (length(ds) > 1)
stop("deflation limited to one dimension")
if (!is.null(dim(du)))
du <- du[, 1]
if (!is.null(dim(dv)))
dv <- dv[, 1]
}
else stop("all three du ds dv parameters must be specified for deflation")
if (!is.null(center)) {
if (is.logical(center) && center)
center <- colMeans(A)
if (deflate)
stop("the center parameter can't be specified together with deflation parameters")
if (length(center) != ncol(A))
stop("center must be a vector of length ncol(A)")
if (fastpath && !right_only)
du <- NULL
else du <- 1
ds <- 1
dv <- center
deflate <- TRUE
}
if ("integer" == typeof(A))
A <- A + 0
iscomplex <- is.complex(A)
m <- nrow(A)
n <- ncol(A)
if (is.null(nu))
nu <- nv
if (!is.null(mult) && deflate)
stop("the mult parameter can't be specified together with deflation parameters")
missingmult <- FALSE
if (is.null(mult)) {
missingmult <- TRUE
mult <- `%*%`
}
k <- max(nu, nv)
if (k <= 0)
stop("max(nu, nv) must be positive")
if (k > min(m - 1, n - 1))
stop("max(nu, nv) must be strictly less than min(nrow(A), ncol(A))")
if (k >= 0.5 * min(m, n)) {
warning("You're computing too large a percentage of total singular values, use a standard svd instead.")
}
if (work <= 1)
stop("work must be greater than 1")
if (tol < 0)
stop("tol must be non-negative")
if (maxit <= 0)
stop("maxit must be positive")
if (work <= k && !right_only)
work <- k + 1
if (work >= min(n, m)) {
work <- min(n, m)
if (work <= k) {
k <- work - 1
warning("Requested subspace dimension too large! Reduced to ",
k)
}
}
k_org <- k
w_dim <- work
if (right_only) {
w_dim <- 1
fastpath <- FALSE
}
if (n > m && smallest) {
interchange <- TRUE
temp <- m
m <- n
n <- temp
}
if (verbose) {
message("Working dimension size ", work)
}
if (min(m, n) < 6) {
A <- as.matrix(A)
if (verbose)
message("Tiny problem detected, using standard `svd` function.")
if (!is.null(scale)) {
A <- sweep(A, 2, scale, "/")
dv <- dv/scale
}
if (!is.null(shift))
A <- A + diag(shift, nrow(A), ncol(A))
if (deflate) {
if (is.null(du))
du <- rep(1, nrow(A))
A <- A - (ds * du) %*% t(dv)
}
s <- svd(A)
if (smallest) {
return(list(d = tail(s$d, k), u = s$u[, tail(seq(ncol(s$u)),
k), drop = FALSE], v = s$v[, tail(seq(ncol(s$v),
k)), drop = FALSE], iter = 0, mprod = 0))
}
return(list(d = s$d[1:k], u = s$u[, 1:nu, drop = FALSE],
v = s$v[, 1:nv, drop = FALSE], iter = 0, mprod = 0))
}
if (deflate)
fastpath <- fastpath && is.null(du)
fastpath <- fastpath && (("Matrix" %in% attributes(class(A)) &&
("dgCMatrix" %in% class(A))) || "matrix" %in% class(A))
if (fastpath && missingmult && !iscomplex && !right_only) {
RESTART <- 0L
RV <- RW <- RS <- NULL
if (is.null(v)) {
v <- random(n)
if (verbose)
message("Initializing starting vector v with samples from standard normal distribution.\nUse `set.seed` first for reproducibility.")
}
else if (is.list(v)) {
if (is.null(v$v) || is.null(v$d) || is.null(v$u))
stop("restart requires left and right singular vectors")
if (max(nu, nv) <= min(ncol(v$u), ncol(v$v)))
return(v)
RESTART <- as.integer(length(v$d))
RND <- random(n)
RND <- orthog(RND, v$v)
RV <- cbind(v$v, RND/norm2(RND))
RW <- v$u
RS <- v$d
v <- NULL
}
SP <- ifelse(is.matrix(A), 0L, 1L)
if (verbose)
message("irlba: using fast C implementation")
SCALE <- NULL
SHIFT <- NULL
CENTER <- NULL
if (!is.null(scale)) {
if (length(scale) != ncol(A))
stop("scale length must match number of matrix columns")
SCALE <- as.double(scale)
}
if (!is.null(shift)) {
if (length(shift) != 1)
stop("shift length must be 1")
SHIFT <- as.double(shift)
}
if (deflate) {
if (length(center) != ncol(A))
stop("the centering vector length must match the number of matrix columns")
CENTER <- as.double(center)
}
ans <- .Call(C_IRLB, A, as.integer(k), as.double(v),
as.integer(work), as.integer(maxit), as.double(tol),
as.double(eps2), as.integer(SP), as.integer(RESTART),
RV, RW, RS, SCALE, SHIFT, CENTER, as.double(svtol))
if (ans[[6]] == 0 || ans[[6]] == -2) {
names(ans) <- c("d", "u", "v", "iter", "mprod", "err")
ans$u <- matrix(head(ans$u, m * nu), nrow = m, ncol = nu)
ans$v <- matrix(head(ans$v, n * nv), nrow = n, ncol = nv)
if (tol * ans$d[1] < eps)
warning("convergence criterion below machine epsilon")
if (ans[[6]] == -2)
warning("did not converge--results might be invalid!; try increasing work or maxit")
return(ans[-6])
}
errors <- c("invalid dimensions", "didn't converge",
"out of memory", "starting vector near the null space",
"linear dependency encountered")
erridx <- abs(ans[[6]])
if (erridx > 1)
warning("fast code path error ", errors[erridx],
"; re-trying with fastpath=FALSE.", immediate. = TRUE)
}
W <- matrix(0, m, w_dim)
F <- matrix(0, n, 1)
restart <- FALSE
if (is.list(v)) {
if (is.null(v$v) || is.null(v$d) || is.null(v$u))
stop("restart requires left and right singular vectors")
if (max(nu, nv) <= min(ncol(v$u), ncol(v$v)))
return(v)
right_only <- FALSE
W[, 1:ncol(v$u)] <- v$u
d <- v$d
V <- matrix(0, n, work)
V[, 1:ncol(v$v)] <- v$v
restart <- TRUE
}
else if (is.null(v)) {
V <- matrix(0, n, work)
V[, 1] <- random(n)
}
else {
V <- matrix(0, n, work)
V[1:length(v)] <- v
}
B <- NULL
Bsz <- NULL
eps23 <- eps^(2/3)
iter <- 1
mprod <- 0
R_F <- NULL
sqrteps <- sqrt(eps)
Smax <- 1
Smin <- NULL
lastsv <- c()
if (restart) {
B <- cbind(diag(d), 0)
k <- length(d)
F <- random(n)
F <- orthog(F, V[, 1:k])
V[, k + 1] <- F/norm2(F)
}
if (deflate && is.null(du))
du <- 1
while (iter <= maxit) {
j <- 1
if (iter == 1 && !restart) {
V[, 1] <- V[, 1]/norm2(V[, 1])
}
else j <- k + 1
j_w <- ifelse(w_dim > 1, j, 1)
VJ <- V[, j]
if (!is.null(scale)) {
VJ <- VJ/scale
}
if (interchange)
avj <- mult(VJ, A)
else avj <- mult(A, VJ)
W[, j_w] <- as.vector(avj)
mprod <- mprod + 1
if (!is.null(shift)) {
W[, j_w] <- W[, j_w] + shift * VJ
}
if (deflate) {
W[, j_w] <- W[, j_w] - ds * drop(cross(dv, VJ)) *
du
}
if (iter != 1 && w_dim > 1 && reorth) {
W[, j] <- orthog(W[, j, drop = FALSE], W[, 1:(j -
1), drop = FALSE])
}
S <- norm2(W[, j_w, drop = FALSE])
if (is.na(S) || S < eps2 && j == 1)
stop("starting vector near the null space")
if (is.na(S) || S < eps2) {
if (verbose)
message_once("invariant subspace found", flag = mflag)
W[, j_w] <- random(nrow(W))
if (w_dim > 1)
W[, j] <- orthog(W[, j], W[, 1:(j - 1)])
W[, j_w] <- W[, j_w]/norm2(W[, j_w])
S <- 0
}
else W[, j_w] <- W[, j_w]/S
while (j <= work) {
j_w <- ifelse(w_dim > 1, j, 1)
if (iscomplex) {
if (interchange)
F <- Conj(t(drop(mult(A, Conj(drop(W[, j_w]))))))
else F <- Conj(t(drop(mult(Conj(drop(W[, j_w])),
A))))
}
else {
if (interchange)
F <- t(drop(mult(A, drop(W[, j_w]))))
else F <- t(drop(mult(drop(W[, j_w]), A)))
}
if (!is.null(shift))
F <- F + shift * W[, j_w]
if (!is.null(scale))
F <- F/scale
if (deflate) {
sub <- sum(W[, j_w]) * dv
if (!is.null(scale))
sub <- sub/scale
F <- F - sub
}
mprod <- mprod + 1
F <- drop(F - S * V[, j])
F <- orthog(F, V[, 1:j, drop = FALSE])
if (j + 1 <= work) {
R <- norm2(F)
if (R < eps2) {
if (verbose)
message_once("invariant subspace found",
flag = mflag)
F <- matrix(random(dim(V)[1]), dim(V)[1], 1)
F <- orthog(F, V[, 1:j, drop = FALSE])
V[, j + 1] <- F/norm2(F)
R <- 0
}
else V[, j + 1] <- F/R
if (is.null(B))
B <- cbind(S, R)
else B <- rbind(cbind(B, 0), c(rep(0, ncol(B) -
1), S, R))
jp1_w <- ifelse(w_dim > 1, j + 1, 1)
w_old <- W[, j_w]
VJP1 <- V[, j + 1]
if (!is.null(scale)) {
VJP1 <- VJP1/scale
}
if (interchange)
W[, jp1_w] <- drop(mult(drop(VJP1), A))
else W[, jp1_w] <- drop(mult(A, drop(VJP1)))
mprod <- mprod + 1
if (!is.null(shift)) {
W[, jp1_w] <- W[, jp1_w] + shift * VJP1
}
if (deflate) {
W[, jp1_w] <- W[, jp1_w] - ds * drop(cross(dv,
VJP1)) * du
}
W[, jp1_w] <- W[, jp1_w] - R * w_old
if (reorth && w_dim > 1)
W[, j + 1] <- orthog(W[, j + 1], W[, 1:j])
S <- norm2(W[, jp1_w])
if (S < eps2) {
if (verbose)
message_once("invariant subspace found",
flag = mflag)
W[, jp1_w] <- random(nrow(W))
if (w_dim > 1)
W[, j + 1] <- orthog(W[, j + 1], W[, 1:j])
W[, jp1_w] <- W[, jp1_w]/norm2(W[, jp1_w])
S <- 0
}
else W[, jp1_w] <- W[, jp1_w]/S
}
else {
B <- rbind(B, c(rep(0, j - 1), S))
}
j <- j + 1
}
Bsz <- nrow(B)
R_F <- norm2(F)
F <- F/R_F
Bsvd <- svd(B)
if (iter == 1) {
Smax <- Bsvd$d[1]
Smin <- Bsvd$d[Bsz]
}
else {
Smax <- max(Smax, Bsvd$d[1])
Smin <- min(Smin, Bsvd$d[Bsz])
}
Smax <- max(eps23, Smax)
if (!reorth && Smin/Smax < sqrteps) {
warning("The matrix is ill-conditioned. Basis will be reorthogonalized.")
reorth <- TRUE
}
if (smallest) {
jj <- seq(ncol(Bsvd$u), 1, by = -1)
Bsvd$u <- Bsvd$u[, jj]
Bsvd$d <- Bsvd$d[jj]
Bsvd$v <- Bsvd$v[, jj]
}
R <- R_F * Bsvd$u[Bsz, , drop = FALSE]
ct <- convtests(Bsz, tol, k_org, Bsvd, abs(R), k, Smax,
lastsv, svtol, maxritz, work, S)
if (verbose) {
message("iter= ", iter, ", mprod= ", mprod, ", sv[",
k_org, "]=", sprintf("%.2e", Bsvd$d[k_org]),
", %change=", sprintf("%.2e", (Bsvd$d[k_org] -
lastsv[k_org])/Bsvd$d[k_org]), ", k=", ct$k)
}
lastsv <- Bsvd$d
k <- ct$k
if (ct$converged)
break
if (iter >= maxit)
break
if (smallest && (Smin/Smax > sqrteps)) {
Bsvd2.d <- Bsvd$d
Bsvd2.d <- diag(Bsvd2.d, nrow = length(Bsvd2.d))
Bsvd2 <- svd(cbind(Bsvd2.d, t(R)))
jj <- seq(ncol(Bsvd2$u), 1, by = -1)
Bsvd2$u <- Bsvd2$u[, jj]
Bsvd2$d <- Bsvd2$d[jj]
Bsvd2$v <- Bsvd2$v[, jj]
Bsvd$d <- Bsvd2$d
Bsvd$u <- Bsvd$u %*% Bsvd2$u
Bsvd$v <- cbind(rbind(Bsvd$v, rep(0, Bsz)), c(rep(0,
Bsz), 1)) %*% Bsvd2$v
V_B_last <- Bsvd$v[Bsz + 1, 1:k]
s <- R_F * solve(B, cbind(c(rep(0, Bsz - 1), 1)))
Bsvd$v <- Bsvd$v[1:Bsz, , drop = FALSE] + s %*% Bsvd$v[Bsz +
1, ]
qrv <- qr(cbind(rbind(Bsvd$v[, 1:k], 0), rbind(-s,
1)))
Bsvd$v <- qr.Q(qrv)
R <- qr.R(qrv)
V[, 1:(k + 1)] <- cbind(V, F) %*% Bsvd$v
UT <- t(R[1:(k + 1), 1:k] + R[, k + 1] %*% rbind(V_B_last))
B <- diag(Bsvd$d[1:k], nrow = k) %*% (UT * upper.tri(UT,
diag = TRUE))[1:k, 1:(k + 1)]
}
else {
V[, 1:(k + dim(F)[2])] <- cbind(V[, 1:(dim(Bsvd$v)[1]),
drop = FALSE] %*% Bsvd$v[, 1:k], F)
B <- cbind(diag(Bsvd$d[1:k], nrow = k), R[1:k])
}
if (w_dim > 1) {
W[, 1:k] <- W[, 1:(dim(Bsvd$u)[1]), drop = FALSE] %*%
Bsvd$u[, 1:k]
}
iter <- iter + 1
}
if (!ct$converged)
warning("did not converge--results might be invalid!; try increasing maxit or work")
d <- Bsvd$d[1:k_org]
if (!right_only) {
u <- W[, 1:(dim(Bsvd$u)[1]), drop = FALSE] %*% Bsvd$u[,
1:k_org, drop = FALSE]
}
v <- V[, 1:(dim(Bsvd$v)[1]), drop = FALSE] %*% Bsvd$v[, 1:k_org,
drop = FALSE]
if (smallest) {
reverse <- seq(length(d), 1)
d <- d[reverse]
if (!right_only)
u <- u[, reverse]
v <- v[, reverse]
}
if (tol * d[1] < eps)
warning("convergence criterion below machine epsilon")
if (right_only)
return(list(d = d, v = v[, 1:nv, drop = FALSE], iter = iter,
mprod = mprod))
return(list(d = d, u = u[, 1:nu, drop = FALSE], v = v[, 1:nv,
drop = FALSE], iter = iter, mprod = mprod))
})(A = new("dgCMatrix", i = c(0L, 1L, 5L, 7L, 10L, 11L, 14L,
15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 25L, 28L, 0L, 1L, 2L,
7L, 12L, 14L, 15L, 19L, 21L, 22L, 23L, 26L, 27L, 28L, 29L, 0L,
3L, 5L, 7L, 8L, 9L, 10L, 11L, 14L, 16L, 18L, 20L, 23L, 26L, 27L,
0L, 1L, 3L, 4L, 5L, 7L, 8L, 9L, 14L, 15L, 16L, 20L, 24L, 26L,
27L, 28L, 2L, 3L, 10L, 11L, 12L, 14L, 20L, 21L, 24L, 25L, 28L,
29L, 10L, 12L, 13L, 23L, 25L, 26L, 0L, 1L, 6L, 8L, 13L, 14L,
19L, 20L, 21L, 24L, 25L, 26L, 27L, 28L, 0L, 1L, 4L, 9L, 10L,
11L, 13L, 15L, 20L, 23L, 25L, 27L, 29L, 3L, 5L, 6L, 8L, 9L, 12L,
13L, 18L, 22L, 23L, 24L, 27L, 28L, 0L, 3L, 4L, 7L, 11L, 13L,
14L, 15L, 16L, 18L, 20L, 21L, 23L, 24L, 25L, 29L, 0L, 2L, 3L,
8L, 9L, 10L, 11L, 14L, 16L, 17L, 20L, 24L, 28L, 1L, 6L, 7L, 8L,
9L, 16L, 17L, 20L, 22L, 23L, 27L, 0L, 1L, 3L, 4L, 5L, 9L, 12L,
18L, 19L, 21L, 22L, 23L, 24L, 26L, 28L, 29L, 0L, 1L, 4L, 5L,
7L, 8L, 10L, 11L, 12L, 16L, 17L, 18L, 19L, 20L, 21L, 0L, 2L,
3L, 7L, 9L, 10L, 11L, 12L, 14L, 15L, 19L, 20L, 21L, 24L, 25L,
26L, 28L, 0L, 5L, 6L, 7L, 9L, 10L, 12L, 13L, 15L, 18L, 19L, 20L,
21L, 23L, 24L, 25L, 26L, 1L, 2L, 4L, 5L, 6L, 9L, 11L, 13L, 14L,
15L, 19L, 21L, 23L, 26L, 28L, 0L, 1L, 4L, 9L, 10L, 11L, 13L,
15L, 18L, 19L, 20L, 21L, 22L, 25L, 28L, 29L, 0L, 2L, 4L, 6L,
7L, 10L, 11L, 12L, 13L, 14L, 21L, 22L, 24L, 25L, 26L, 0L, 2L,
3L, 4L, 6L, 7L, 9L, 11L, 12L, 13L, 14L, 15L, 18L, 19L, 20L, 21L,
24L), p = c(0L, 17L, 32L, 47L, 63L, 75L, 81L, 95L, 108L, 121L,
137L, 150L, 161L, 177L, 192L, 209L, 226L, 241L, 257L, 272L, 289L
), Dim = c(30L, 20L), Dimnames = list(c("c1", "c2", "c3", "c4",
"c5", "c6", "c7", "c8", "c9", "c10", "c11", "c12", "c13", "c14",
"c15", "c16", "c17", "c18", "c19", "c20", "c21", "c22", "c23",
"c24", "c25", "c26", "c27", "c28", "c29", "c30"), c("g1", "g2",
"g3", "g4", "g5", "g6", "g7", "g8", "g9", "g10", "g11", "g12",
"g13", "g14", "g15", "g16", "g17", "g18", "g19", "g20")), x = c(0.640101045137271,
0.991838620044291, 0.754820944508538, 0.511169783771038, 0.595711996313184,
0.57487219828181, 0.642795492196456, 0.928615199634805, 0.598092422354966,
0.560900748008862, 0.526027723914012, 0.985095223877579, 0.507641822332516,
0.682788078673184, 0.601541217649356, 0.729309623362496, 0.746698269620538,
0.864544949028641, 0.614644971676171, 0.557159538846463, 0.529630602803081,
0.895094102947041, 0.779984889784828, 0.880619034869596, 0.723725946620107,
0.630414122482762, 0.840614554006606, 0.856131664710119, 0.895445425994694,
0.644315762910992, 0.741078648716211, 0.605303446529433, 0.903081611497328,
0.886450943304226, 0.877057543024421, 0.758103052387014, 0.724498892668635,
0.943724818294868, 0.547646587016061, 0.711743867723271, 0.927302088588476,
0.59057315881364, 0.840507032116875, 0.782851336989552, 0.516796836396679,
0.518576137488708, 0.562782935798168, 0.717935275984928, 0.961409936426207,
0.763222689507529, 0.947966354666278, 0.818634688388556, 0.649579460499808,
0.953355451114476, 0.953732650028542, 0.510125206550583, 0.923968471353874,
0.510959698352963, 0.854001502273604, 0.631420228397474, 0.689627848798409,
0.689413412474096, 0.554900623159483, 0.578353944001719, 0.910370304249227,
0.942957059247419, 0.761973861604929, 0.932909828843549, 0.603588067693636,
0.934691370232031, 0.523986077867448, 0.787540507735685, 0.702462512534112,
0.754705621628091, 0.620410033036023, 0.770737042883411, 0.527310776989907,
0.880319068906829, 0.981563460314646, 0.506939497077838, 0.68144251476042,
0.929253919748589, 0.673712232848629, 0.991099219536409, 0.813435208518058,
0.841351716779172, 0.719913988374174, 0.969208805356175, 0.624714189674705,
0.664618249749765, 0.996077371528372, 0.855082356370986, 0.953548396006227,
0.812305092345923, 0.782182115828618, 0.762151529546827, 0.986311589134857,
0.812131523853168, 0.582205270184204, 0.970162178855389, 0.98949983343482,
0.542130424408242, 0.676164050819352, 0.725405272562057, 0.784546229988337,
0.981018084799871, 0.847882149508223, 0.886458750581369, 0.837416569236666,
0.587035141419619, 0.836732269730419, 0.702778743347153, 0.69882453721948,
0.562176787760109, 0.928483226336539, 0.864807550329715, 0.564263842999935,
0.656162315513939, 0.97855406277813, 0.796836083987728, 0.831671715015545,
0.963312016334385, 0.925229935208336, 0.507035602582619, 0.659821025794372,
0.658877609064803, 0.954378136899322, 0.897848492022604, 0.943697054404765,
0.72369075124152, 0.781017540255561, 0.940308712190017, 0.993749226210639,
0.747635063482448, 0.792909023817629, 0.705859006382525, 0.695012246258557,
0.822793305618688, 0.514732652809471, 0.663010967662558, 0.932571928249672,
0.838384066708386, 0.879433296155185, 0.935712467646226, 0.537864922778681,
0.801687705563381, 0.739641745807603, 0.92051784065552, 0.609748935094103,
0.942505322396755, 0.964317037956789, 0.657828069292009, 0.578161916695535,
0.987101763952523, 0.603792401496321, 0.938413745490834, 0.715833283727989,
0.690256722969934, 0.95514673832804, 0.712540122447535, 0.863630566513166,
0.691927672130987, 0.760313281789422, 0.849457093048841, 0.946817819029093,
0.588419190375134, 0.877578062238172, 0.939136706059799, 0.517009826377034,
0.846245752647519, 0.554177061188966, 0.688275237567723, 0.658057553693652,
0.663342725252733, 0.969528166111559, 0.849552103783935, 0.756644907407463,
0.532601219369099, 0.874149660812691, 0.72776700463146, 0.716589478775859,
0.646067276829854, 0.541979279834777, 0.637908723205328, 0.829201063839719,
0.708975198445842, 0.92817754833959, 0.804390771314502, 0.758696807082742,
0.957249888917431, 0.993913878686726, 0.606440994655713, 0.62177327950485,
0.955675768665969, 0.653349443105981, 0.995965478708968, 0.561988092726097,
0.732718017650768, 0.870805552927777, 0.572170259663835, 0.906315261265263,
0.770653631538153, 0.821162318112329, 0.829324304359034, 0.654732875758782,
0.731371578993276, 0.907291416078806, 0.696196999400854, 0.644107228610665,
0.957636520732194, 0.827717769658193, 0.525305503746495, 0.667747627478093,
0.842589903390035, 0.737305467948318, 0.948938177432865, 0.646679189987481,
0.596448455704376, 0.52804887923412, 0.962333308532834, 0.708740051137283,
0.553475703578442, 0.778042529011145, 0.651940943440422, 0.830245703924447,
0.648550947429612, 0.814251750474796, 0.928777225781232, 0.749821664998308,
0.975657349685207, 0.974792463472113, 0.950951009057462, 0.934760116506368,
0.53306060587056, 0.538794299354777, 0.714717949740589, 0.62665484752506,
0.851667639799416, 0.768248430453241, 0.621076293755323, 0.634875798830763,
0.938176916679367, 0.857501537073404, 0.828534359810874, 0.689457366475835,
0.668050603941083, 0.90454664779827, 0.932808704674244, 0.792378755984828,
0.862034041201696, 0.685107505181804, 0.942074909573421, 0.675853760447353,
0.843120148405433, 0.567687397589907, 0.588066393043846, 0.751504168147221,
0.867238787235692, 0.798814549576491, 0.623435709392652, 0.587927932385355,
0.913784642005339, 0.671408327762038, 0.768144550733268, 0.522248276043683,
0.828075018012896, 0.52709619468078, 0.791456031380221, 0.77818130212836,
0.515526150586084, 0.59724048548378, 0.505843024002388, 0.919331770390272,
0.507374254753813, 0.820171616971493, 0.5983954181429, 0.559310270706192,
0.789094472071156, 0.970451730070636, 0.929743205895647, 0.900939270388335,
0.750882187858224, 0.676568772410974, 0.648013445781544, 0.530824364162982,
0.942704762332141, 0.71222455939278, 0.724490575492382, 0.783097670879215
), factors = list()), nv = 4L, center = c(g1 = 0.38593401365603,
g2 = 0.368623588730892, g3 = 0.369723228070264, g4 = 0.404341783265894,
g5 = 0.301798306289129, g6 = 0.144943745364435, g7 = 0.387550095422193,
g8 = 0.351535562922557, g9 = 0.328191428189166, g10 = 0.429679381405003,
g11 = 0.337953505238208, g12 = 0.288900745629023, g13 = 0.405216105290068,
g14 = 0.375470293158044, g15 = 0.430853383569047, g16 = 0.413724889412212,
g17 = 0.38727024817684, g18 = 0.417563440534286, g19 = 0.343214032713634,
g20 = 0.425453944923356))`: function 'as_cholmod_sparse' not provided by package 'Matrix'
Backtrace:
▆
1. └─destiny:::pca_scores(test_matrix_sparse, test_n_pcs)
2. └─irlba::prcomp_irlba(x, n_pcs, center = center, scale. = scale)
3. ├─base::do.call(irlba, args = args)
4. └─irlba (local) `<fn>`(A = `<dgCMatrx[,20]>`, nv = 4L, center = `<dbl>`)
[ FAIL 2 | WARN 0 | SKIP 1 | PASS 65 ]
Error: Test failures
Execution halted
destiny.Rcheck/destiny-Ex.timings
| name | user | system | elapsed | |
| DPT-matrix-methods | 1.649 | 0.080 | 1.735 | |
| DPT-methods | 1.515 | 0.091 | 1.611 | |
| DPT | 1.628 | 0.076 | 1.713 | |
| DiffusionMap-accessors | 0.375 | 0.078 | 0.453 | |
| DiffusionMap-class | 3.251 | 0.061 | 3.316 | |
| DiffusionMap-methods | 0.317 | 0.035 | 0.354 | |
| ExpressionSet-helpers | 0.102 | 0.003 | 0.106 | |
| Gene-Relevance-methods | 1.427 | 0.199 | 1.674 | |
| Gene-Relevance-plotting | 6.347 | 0.521 | 6.920 | |
| Gene-Relevance | 3.231 | 0.244 | 3.481 | |
| Sigmas-class | 0.135 | 0.019 | 0.154 | |
| coercions | 0.357 | 0.033 | 0.402 | |
| colorlegend | 0.019 | 0.001 | 0.020 | |
| cube_helix | 0.008 | 0.002 | 0.009 | |
| destiny-generics | 0.382 | 0.081 | 0.464 | |
| destiny | 3.955 | 0.090 | 4.058 | |
| dm_predict | 0.426 | 0.031 | 0.457 | |
| eig_decomp | 0.002 | 0.001 | 0.002 | |
| extractions | 0.694 | 0.060 | 0.755 | |
| find_dm_k | 0.018 | 0.002 | 0.020 | |
| find_sigmas | 0.426 | 0.061 | 0.489 | |
| find_tips | 0.342 | 0.031 | 0.374 | |
| l_which | 0 | 0 | 0 | |
| plot.DPT | 2.593 | 0.140 | 2.734 | |
| plot.DiffusionMap | 0.506 | 0.047 | 0.570 | |
| plot.Sigmas | 0.146 | 0.023 | 0.173 | |
| projection_dist | 0.208 | 0.022 | 0.230 | |
| random_root | 0.313 | 0.040 | 0.354 | |