namedSparse-class {ontoTools} | R Documentation |
manages margin names for sparse matrices
Objects can be created by calls of the form new("namedSparse", ...)
.
These are S4 objects that include a SparseM::matrix.csr,
associated dimnames in the customary form, and two
lists of name-to-index mapping environments (for row and column name resolution,
with forward (name to index) and backward (index to name) mapping).
Dimnames
:"list"
ordinary
dimnames matrix metadata mat
:"matrix.csr"
sparse matrix signature(e1 = "namedSparse", e2 = "namedSparse")
: ... signature(object = "namedSparse")
: ... A constructor makeNamedSparse is illustrated in the example.
VJ Carey <stvjc@channing.harvard.edu>
data(A.csr) namedA <- mkNS(A.csr) # installs default dimnames R{1:nrow}, C{1:ncol} print(namedA) print(colSums(namedA)) dimnames(namedA) <- list(paste("A",1:10,sep=""),paste("B",1:5,sep="")) print(namedA) print(namedA %*% t(namedA))