I cannot get the core 'snmf' function to run in my environment.
Is there a dependency I'm missing?
My code:
data <- load_data(tnbc)
counts <- data$counts
S <- data$S
results <- snmf(gpu.matrix(counts), S, 5, niter=2000, tol=1e-4, num_initializations=10, probs=0.75, seed=42)
The error:
Error in dtype(V) : could not find function "dtype"
My session:
R version 4.6.1 (2026-06-24 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 26200)
Matrix products: default
LAPACK version 3.12.1
locale:
[1] LC_COLLATE=English_United Kingdom.utf8 LC_CTYPE=English_United Kingdom.utf8 LC_MONETARY=English_United Kingdom.utf8
[4] LC_NUMERIC=C LC_TIME=English_United Kingdom.utf8
time zone: Europe/London
tzcode source: internal
attached base packages:
[1] stats graphics grDevices datasets utils methods base
other attached packages:
[1] here_1.0.2 GPUmatrix_1.0.3 torch_0.17.0 Seurat_5.5.1 SeuratObject_5.4.0 sp_2.2-3 SNMF_0.0.1.1
loaded via a namespace (and not attached):
[1] deldir_2.0-4 pbapply_1.7-4 gridExtra_2.3.1 rlang_1.3.0 magrittr_2.0.5 RcppAnnoy_0.0.23
[7] otel_0.2.0 spatstat.geom_3.8-2 matrixStats_1.5.0 ggridges_0.5.7 compiler_4.6.1 callr_3.8.0
[13] png_0.1-9 vctrs_0.7.3 reshape2_1.4.5 stringr_1.6.0 pkgconfig_2.0.3 fastmap_1.2.0
[19] promises_1.5.0 bit_4.6.0 purrr_1.2.2 xfun_0.60 jsonlite_2.0.0 goftest_1.2-3
[25] later_1.4.8 spatstat.utils_3.2-4 irlba_2.3.7 parallel_4.6.1 cluster_2.1.8.2 R6_2.6.1
[31] ica_1.0-3 stringi_1.8.9 RColorBrewer_1.1-3 spatstat.data_3.1-9 reticulate_1.46.0 parallelly_1.48.0
[37] spatstat.univar_3.2-0 lmtest_0.9-40 scattermore_1.2 Rcpp_1.1.2 knitr_1.51 tensor_1.5.1
[43] future.apply_1.20.2 zoo_1.9-0 sctransform_0.4.3 httpuv_1.6.17 Matrix_1.7-5 splines_4.6.1
[49] igraph_2.3.3 tidyselect_1.2.1 rstudioapi_0.19.0 abind_1.4-8 yaml_2.3.12 spatstat.random_3.5-1
[55] codetools_0.2-20 miniUI_0.1.2 spatstat.explore_3.8-2 processx_3.9.0 listenv_1.0.0 lattice_0.22-9
[61] tibble_3.3.1 plyr_1.8.9 shiny_1.14.0 S7_0.2.2 ROCR_1.0-12 evaluate_1.0.5
[67] Rtsne_0.17 future_1.75.0 fastDummies_1.7.6 survival_3.8-6 polyclip_1.10-7 fitdistrplus_1.2-6
[73] pillar_1.11.1 BiocManager_1.30.27 KernSmooth_2.23-26 renv_1.2.2 plotly_4.12.1 generics_0.1.4
[79] rprojroot_2.1.1 RcppHNSW_0.7.0 ggplot2_4.0.3 scales_1.4.0 coro_1.1.0 globals_0.19.1
[85] xtable_1.8-8 glue_1.8.1 tools_4.6.1 data.table_1.18.4 RSpectra_0.16-2 RANN_2.6.2
[91] dotCall64_1.2 cowplot_1.2.0 grid_4.6.1 tidyr_1.3.2 nlme_3.1-169 patchwork_1.3.2
[97] cli_3.6.6 spatstat.sparse_3.2-0 spam_2.11-4 viridisLite_0.4.3 dplyr_1.2.1 uwot_0.2.4
[103] gtable_0.3.6 digest_0.6.39 progressr_1.0.0 ggrepel_0.9.8 htmlwidgets_1.6.4 farver_2.1.2
[109] htmltools_0.5.9 lifecycle_1.0.5 httr_1.4.8 mime_0.13 bit64_4.8.2 MASS_7.3-65
I cannot get the core 'snmf' function to run in my environment.
Is there a dependency I'm missing?
My code:
The error:
Error in dtype(V) : could not find function "dtype"My session: