Package: spam 2.11-0

Reinhard Furrer

spam: SPArse Matrix

Set of functions for sparse matrix algebra. Differences with other sparse matrix packages are: (1) we only support (essentially) one sparse matrix format, (2) based on transparent and simple structure(s), (3) tailored for MCMC calculations within G(M)RF. (4) and it is fast and scalable (with the extension package spam64). Documentation about 'spam' is provided by vignettes included in this package, see also Furrer and Sain (2010) <doi:10.18637/jss.v036.i10>; see 'citation("spam")' for details.

Authors:Reinhard Furrer [aut, cre], Florian Gerber [aut], Roman Flury [aut], Daniel Gerber [ctb], Kaspar Moesinger [ctb], Annina Cincera [ctb], Youcef Saad [ctb], Esmond G. Ng [ctb], Barry W. Peyton [ctb], Joseph W.H. Liu [ctb], Alan D. George [ctb], Lehoucq B. Rich [ctb], Maschhoff Kristi [ctb], Sorensen C. Danny [ctb], Yang Chao [ctb]

spam_2.11-0.tar.gz
spam_2.11-0.tar.gz(r-4.5-noble)spam_2.11-0.tar.gz(r-4.4-noble)
spam_2.11-0.tgz(r-4.4-emscripten)spam_2.11-0.tgz(r-4.3-emscripten)
spam.pdf |spam.html
spam/json (API)
NEWS

# Install 'spam' in R:
install.packages('spam', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
Datasets:
  • Oral - Oral Cavity Cancer
  • UScounties.ndorder - Adjacency Structure of the Counties in the Contiguous United States
  • UScounties.storder - Adjacency Structure of the Counties in the Contiguous United States
  • USprecip - Monthly Total Precipitation (mm) for April 1948 in the Contiguous United States
  • germany - Meta-data About Administrative Districts of Germany
  • germany.info - Meta-data About Administrative Districts of Germany
  • germany.poly - Meta-data About Administrative Districts of Germany

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

8.96 score 1 stars 412 packages 410 scripts 89k downloads 1 mentions 172 exports 2 dependencies

Last updated 2 months agofrom:f01cbacb71. Checks:OK: 1 WARNING: 1. Indexed: no.

TargetResultDate
Doc / VignettesOKNov 03 2024
R-4.5-linux-x86_64WARNINGNov 03 2024

Exports:%d*%%d+%adjacency.landkreisall.equalall.equal.spamapply.spamas.dgCMatrix.spamas.dgRMatrix.spamas.matrixas.matrix.spamas.spamas.spam.chol.NgPeytonas.spam.dgCMatrixas.spam.dgRMatrixas.spam.distas.spam.listas.spam.matrixas.spam.matrix.csras.spam.numericas.spam.spamas.vector.spambacksolvebacksolve.spambandwidthbdiag.spamcbindcbind.spamcholchol.spamchol2invchol2inv.spamcirculant.spamcleanupcolindices<-colMeanscolMeans.spamcolSumscolSums.spamcor.sphcov.expcov.finnmatcov.matcov.mat12cov.mat32cov.mat52cov.nugcov.sphcov.wend1cov.wend2cov.wu1cov.wu2cov.wu3covmatcrossprod.spamdetdeterminantdeterminant.spamdeterminant.spam.chol.NgPeytondiagdiag.of.spamdiag.spamdiag.spam<-diag<-diag<-.spamdiff.spamdim<-.spamdimension<-displaydisplay.spameigen_approxeigen.spamentries<-forwardsolveforwardsolve.spamgermany.plotgmultgrid_trace2grid_zoomheadhead.spamimageimage.spamis.spamisSymmetricisSymmetric.spamkroneckerkronecker.defaultkronecker.spamlower.trilower.tri.spammap.landkreisMathMath2mlemle.nomeanmle.nomean.spammle.spamnearest.distneg2loglikelihoodneg2loglikelihood.nomeanneg2loglikelihood.spamnormnorm.spamorderingpad<-pad<-.spampermutationpermutation.spamplot.spampowerboostprecmatprecmat.GMRFreglatprecmat.IGMRFirreglatprecmat.IGMRFreglatprecmat.RW1precmat.RW2precmat.RWnprecmat.seasonprintprint_nnzposprint.spamprint.spam.chol.NgPeytonrbindrbind.spamread.HBread.MMrgrfrmvnormrmvnorm.canonicalrmvnorm.canonical.constrmvnorm.condrmvnorm.conditionalrmvnorm.constrmvnorm.precrmvnorm.prec.constrmvnorm.spamrmvtrmvt.spamrowMeansrowMeans.spamrowpointers<-rowSumsrowSums.spamsolvesolve.spamspamspam_diagspam_randomspam_rdistspam_rdist.earthspam.listspam.numericspam.versionspam.Versionsubset.spamsummarySummarysummary.spamsummary.spam.chol.NgPeytontt.spamtailtail.spamtcrossprod.spamtoeplitz.spamtripletupdate.spam.chol.NgPeytonupper.triupper.tri.spamvalidate_spamvalidspamobjectvar.spam

Dependencies:dotCall64Rcpp

Illustrations and Examples

Rendered fromspam.Rmdusingknitr::rmarkdownon Nov 03 2024.

Last update: 2021-06-25
Started: 2018-12-20

JSS - Areal count data

Rendered fromjss15.pdf.asisusingR.rsp::asison Nov 03 2024.

Last update: 2015-09-30
Started: 2015-09-30

Readme and manuals

Help Manual

Help pageTopics
SPArse Matrix Packagespam-package . SPAM . SPAM Spam
Administrative Districts of Germanyadjacency adjacency.landkreis adjacency.spam germany.graph
Test if Two Sparse Matrices are (Nearly) Equalall.equal,matrix,spam-method all.equal,spam,matrix-method all.equal,spam,spam-method all.equal.spam
Apply Functions Over Sparse Matrix Marginsapply.spam
Bandwidth of a Sparse Matrixbandwidth
Binds Arrays Corner-to-Cornerbdiag bdiag.spam
Combine Sparse Matrices by Rows or Columnscbind cbind,spam-method cbind.spam rbind rbind,spam-method rbind.spam
Cholesky Factorization for Sparse Matriceschol chol,ANY-method chol,matrix-method chol,spam-method chol.spam update,spam.chol.NgPeyton-method update.spam update.spam.chol.NgPeyton
Create Circulant Matricescirculant.spam
Cleaning up sparse matricescleanup
Force a 'spam' Object to Belong to a Classcoerce,spam,integer-method coerce,spam,list-method coerce,spam,logical-method coerce,spam,matrix-method coerce,spam,vector-method coerce.spam
Coercion to a Vectoras.vector as.vector,spam-method as.vector,spam.chol.NgPeyton-method as.vector.spam
Complexity for Sparse Matricescomplexities complexity
Slot Modificationcolindices colindices<- constructors dimension<- entries entries<- rowpointers rowpointers<-
Covariance Functionscor.sph cov.exp cov.finnmat cov.mat cov.mat12 cov.mat32 cov.mat52 cov.nug cov.sph cov.wend1 cov.wend2 cov.wu1 cov.wu2 cov.wu3 covmat
Spam Matrix Crossproductcrossprod,ANY,spam-method crossprod,spam,ANY-method crossprod,spam,missing-method crossprod,spam,spam-method crossprod.default crossprod.spam tcrossprod,ANY,spam-method tcrossprod,spam,ANY-method tcrossprod,spam,missing-method tcrossprod,spam,spam-method tcrossprod.spam
Determinant of a Symmetric Positive Definite Sparse Matrixdet det,spam-method det,spam.chol.NgPeyton-method det.spam determinant determinant,spam-method determinant.spam determinant.spam.chol determinant.spam.chol.NgPeyton
Sparse Matrix diagonalsdiag diag,ANY-method diag,spam-method diag.assign,spam-method diag.of.spam diag.spam diag.spam<- diag<- diag<-,ANY-method diag<-,spam-method diag<-.spam spam_diag
Lagged Differencesdiff diff,spam-method diff.spam
Dimensions of an Objectdim.spam dim<-,spam-method dim<-.spam
Graphially Represent the Nonzero Entriesdisplay display,spam-method display.spam
Eigenvalues for Sparse Matriceseigen.spam eigen_approx
Wrapper for Distance Matrix Computationrdist.dist spam_rdist spam_rdist.earth
Transformation to Other Sparse Formatsas.dgCMatrix.spam as.dgRMatrix.spam as.spam.dgCMatrix as.spam.dgRMatrix as.spam.matrix.csr foreign
Meta-data About Administrative Districts of Germanygermany germany.data germany.info germany.poly germany.spam
Plot Administrative Districts of Germanygermany.plot
Generalized Multiplicationgmult
Two trace plots and a scatter plot.grid_trace2
grid_zoomgrid_zoom
Return the First or Last Part of an Objecthead,spam-method head,spam.chol.NgPeyton-method head.spam tail,spam-method tail,spam.chol.NgPeyton-method tail.spam
Display a Sparse Matrix as Color Imageimage image,spam-method image.spam image.spam.chol
Read External Matrix Formatsimport read.HB read.MM
Test if a Sparse Matrix is SymmetricisSymmetric,spam-method isSymmetric.spam
Kronecker Products on Sparse Matriceskronecker,ANY,spam-method kronecker,spam,ANY-method kronecker,spam,spam-method kronecker.default kronecker.spam
Large 64-bit matrices require the R package 'spam64'64bit 64bits large matries large matrix large_matries large_matrix long vector long vectors spam64
Lower and Upper Triangular Part of a Sparse Matrixlower.tri lower.tri.spam upper.tri upper.tri.spam
Create Precision Matricesprecmat.GMRFreglat
Administrative districts of Germanymap.landkreis
Mathematical Functionsabs,spam-method abs.spam acos,spam-method acos.spam acosh,spam-method acosh.spam asin,spam-method asin.spam asinh,spam-method asinh.spam atan,spam-method atan.spam atanh,spam-method atanh.spam ceiling,spam-method ceiling.spam cos,spam-method cos.spam cosh,spam-method cosh.spam cummax,spam-method cummax.spam cummin,spam-method cummin.spam cumprod,spam-method cumprod.spam cumsum,spam-method cumsum.spam digamma,spam-method digamma.spam exp,spam-method exp.spam floor,spam-method floor.spam gamma,spam-method gamma.spam lgamma,spam-method lgamma.spam log,spam-method log.spam log10,spam-method log10.spam log2,spam-method log2.spam Math Math,spam-method Math.spam sin,spam-method sin.spam sqrt,spam-method sqrt.spam tan,spam-method tan.spam trigamma,spam-method trigamma.spam trunc,spam-method trunc.spam
Rounding of NumbersMath2 Math2,spam,numeric-method Math2,spam-method Math2.spam round,spam-method round.spam signif,spam-method signif.spam
Maximum likelihood estimatesmle mle.nomean mle.nomean.spam mle.spam neg2loglikelihood neg2loglikelihood.nomean neg2loglikelihood.spam
Distance Matrix Computationdist.spam distance nearest.dist
Options SettingsgetOption.spam options.spam spam.options
Oral Cavity CancerOral Oral.spam oral.spam
Extract the permutationordering ordering,matrix-method ordering,spam-method ordering-methods ordering.spam ordering.spam.chol ordering.spam.chol.NgPeyton
Padding a Sparse Matrixpad pad.spam pad<- pad<-,matrix-method pad<-,spam-method pad<-.spam
Permute a Matrixpermutation permutation,matrix-method permutation,spam-method permutation.spam
Specific Options Settingpowerboost
IGMRF Precision Matricesprecmat precmat.IGMRFirreglat precmat.IGMRFreglat precmat.RW1 precmat.RW2 precmat.RWn precmat.season
Printing and Summarizing Sparse Matricesprint print,spam-method print.spam print.spam.chol print.spam.chol.NgPeyton print_nnzpos summary,spam-method summary.spam summary.spam.chol summary.spam.chol.NgPeyton
Create Random Sparse Matricesspam_random
Draw From a Gaussian Random Fieldrgrf rgrf.spam
Draw Multivariate Normalsrmvnorm rmvnorm.canonical rmvnorm.prec rmvnorm.spam
Draw Conditional Multivariate Normalsrmvnorm.cond rmvnorm.conditional rmvnorm.conditional.spam
Draw Constrainted Multivariate Normalsrmvnorm.canonical.const rmvnorm.const rmvnorm.prec.const
Draw From a Multivariate t-Distributionrmvt rmvt.spam
Form Row and Column Sums and MeanscolMeans colMeans,spam-method colMeans.spam colSums colSums,spam-method colSums.spam rowMeans rowMeans,spam-method rowMeans.spam rowSums rowSums,spam-method rowSums.spam
Wappers for Sparse Matricesvar.spam
Sparse Matrix Classas.spam as.spam,dist-method as.spam,list-method as.spam,matrix-method as.spam,numeric-method as.spam,spam-method as.spam.chol.NgPeyton as.spam.dist as.spam.list as.spam.matrix as.spam.numeric as.spam.spam initialize,spam-method is.spam spam spam,list-method spam,numeric-method spam.creation spam.list spam.numeric
Class "spam"!,spam-method +,spam,missing-method -,spam,missing-method Arith,ANY,spam-method Arith,spam,ANY-method Arith,spam,spam-method as.matrix,spam-method as.matrix.spam c,spam-method Compare,ANY,spam-method Compare,spam,ANY-method Compare,spam,spam-method length,spam-method length<-,spam-method lower.tri,spam-method plot,spam,missing-method plot,spam,spam-method show,spam-method spam-class spam.class t,spam-method upper.tri,spam-method [,spam,ANY,ANY,ANY-method [,spam,matrix,matrix,ANY-method [,spam,matrix,missing,logical-method [,spam,matrix,missing,missing-method [,spam,missing,missing,ANY-method [,spam,missing,vector,ANY-method [,spam,spam,missing,ANY-method [,spam,vector,missing,logical-method [,spam,vector,missing,missing-method [,spam,vector,vector,ANY-method [<-,spam,ANY,ANY,ANY-method [<-,spam,ANY-method [<-,spam,matrix,matrix,ANY-method [<-,spam,matrix,matrix,numeric-method [<-,spam,matrix,missing,ANY-method [<-,spam,matrix,missing,numeric-method [<-,spam,missing,missing,ANY-method [<-,spam,missing,missing,numeric-method [<-,spam,missing,vector,ANY-method [<-,spam,missing,vector,numeric-method [<-,spam,missing,vector,spam-method [<-,spam,spam,missing,ANY-method [<-,spam,spam,missing,numeric-method [<-,spam,vector,missing,ANY-method [<-,spam,vector,missing,numeric-method [<-,spam,vector,missing,spam-method [<-,spam,vector,vector,ANY-method [<-,spam,vector,vector,numeric-method [<-,spam,vector,vector,spam-method
Defunct Objects in Package 'spam'spam-defunct validspamobject
Basic Linear Algebra for Sparse Matrices!=,spam-method %%,spam-method %*%,ANY,ANY-method %*%,matrix,spam-method %*%,numeric,spam-method %*%,spam,matrix-method %*%,spam,numeric-method %*%,spam,spam-method %*%-methods %/%,spam-method %d*% %d*%,matrix,ANY-method %d*%,matrix,spam-method %d*%,numeric,matrix-method %d*%,numeric,numeric-method %d*%,numeric,spam-method %d*%,spam,ANY-method %d*%,spam,numeric-method %d*%,spam,spam-method %d+% %d+%,matrix,ANY-method %d+%,matrix,spam-method %d+%,numeric,matrix-method %d+%,numeric,numeric-method %d+%,numeric,spam-method %d+%,spam,ANY-method %d+%,spam,numeric-method %d+%,spam,spam-method &,ANY,spam-method &,spam,ANY-method &,spam,spam-method *,ANY,spam-method *,spam,ANY-method *,spam,spam-method +,ANY,spam-method +,matrix,spam-method +,spam,ANY-method +,spam,matrix-method +,spam,spam-method -,ANY,spam-method -,matrix,spam-method -,spam,ANY-method -,spam,matrix-method -,spam,spam-method /,ANY,spam-method /,matrix,spam-method /,spam,ANY-method /,spam,spam-method <,spam-method <=,spam-method ==,spam-method >,spam-method >=,spam-method assign.spam dim,ANY-method dim,spam-method ncol,spam-method norm norm,ANY-method norm,matrix,character-method norm,matrix,missing-method norm,numeric,character-method norm,numeric,missing-method norm,spam,character-method norm,spam,missing-method norm.spam nrow,spam-method Ops.spam plot.spam spam.ops subset.spam t.spam [.spam [<-,spam,ANY,ANY-method [<-,spam,matrix,matrix-method [<-,spam,matrix,missing-method [<-,spam,missing,missing-method [<-,spam,missing,vector-method [<-,spam,spam,missing-method [<-,spam,vector,missing-method [<-,spam,vector,vector-method [<-.spam ^,ANY,spam-method ^,spam,ANY-method ^,spam,spam-method ^,spam-method |,ANY,spam-method |,spam,ANY-method |,spam,spam-method
Linear Equation Solving for Sparse Matricesbacksolve backsolve,ANY-method backsolve,matrix-method backsolve,spam-method backsolve-methods backsolve.spam chol2inv chol2inv,spam-method chol2inv,spam.chol.NgPeyton-method chol2inv.spam forwardsolve forwardsolve,ANY-method forwardsolve,matrix-method forwardsolve,spam-method forwardsolve-methods forwardsolve.spam solve solve,ANY-method solve,spam-method solve.spam
Class "spam.chol.NgPeyton"as.matrix,spam.chol.NgPeyton-method as.spam,spam.chol.NgPeyton-method backsolve,spam.chol.NgPeyton-method c,spam.chol.NgPeyton-method chol,spam.chol.NgPeyton-method determinant,spam.chol.NgPeyton-method diag,spam.chol.NgPeyton-method diag<-,spam.chol.NgPeyton-method dim,spam.chol.NgPeyton-method dim<-,spam.chol.NgPeyton-method display,spam.chol.NgPeyton-method forwardsolve,spam.chol.NgPeyton-method image,spam.chol.NgPeyton-method length,spam.chol.NgPeyton-method length<-,spam.chol.NgPeyton-method ordering,spam.chol.NgPeyton-method print,spam.chol.NgPeyton-method show,spam.chol.NgPeyton-method spam.chol.NgPeyton-class summary,spam.chol.NgPeyton-method t,spam.chol.NgPeyton-method
Rounding of Numbersall,spam-method all.spam any,spam-method any.spam max,spam-method max.spam min,spam-method min.spam prod,spam-method prod.spam range,spam-method range.spam sum,spam-method sum.spam Summary Summary,spam-method Summary.spam
Create Toeplitz Matricestoeplitz.spam
Transform a "spam" Format to Tripletstriplet
Adjacency Structure of the Counties in the Contiguous United StatesUScounties UScounties.ndorder UScounties.storder
Monthly Total Precipitation (mm) for April 1948 in the Contiguous United StatesUSprecip
Validate a Sparse Matrixvalidate_spam
Spam Version Informationspam.Version spam.version version