News for R Package Matrix

Changes in version 1.2-16 (2019-03-04, svn r3291)

New Features

give information about #rows and #columns that are
suppressed in print()ing if the matrix is larger than 'max.print'.

Bug Fixes

data(<Matrix-data>) no longer attaches Matrix to
the search path.

"Ops" group methods, i.e., "Arith", "Compare" & "Logic",
now should all work with 0-extent matrices as well, thanks to bug
reports by Aaron Lun, University of Cambridge.

when printing and formatting sparse matrices, see formatSpMatrix(),
the maxp option, e.g., from getOption("max.print"), is
“rounded up” to 100, as very small values are very rarely appropriate.

Changes in version 1.2-15 (2018-08-20, svn r3283)

New Features

image() gets new optional argument border.color.

Bug Fixes

image(Matrix(0, n,m)) now works.

Changes in version 1.2-14 (2018-04-08, svn r3278)

New Features

German translation updates.

Bug Fixes

one more PROTECT().

Changes in version 1.2-13 (2018-03-25, svn r3275)

New Features

Faster as(<matrix>, "sparseMatrix") and coercion
"dgCMatrix", "ngCMatrix", etc, via new direct C
matrix_to_Csparse() which does not go via
"dgeMatrix". This also works for large matrices
m, i.e., when length(m) >= .Machine$integer.max.

Bug Fixes

cbind(NULL,<Matrix>) no longer return NULL;
analogously for rbind(), rbind2(), cbind2(),
fixing very long standing typo in the corresponsing cbind2()
and rbind2() methods.

The deprecation warning (once per session) for
cBind() and rBind() finally works (fixing a simple thinko).

cbind() and rbind() for largish sparse
matrices no longer gives an error because of integer overflow
(in the default case where sparse is not been specified
hence is chosen by a nnzero() based heuristic).

.symDiagonal(5, 5:1) and .trDiagonal(x = 4:1)
now work as expected.

Sp[i] now is much more efficient for large sparse
matrices Sp, notably when the result is short.

<sparseVector>[ <negative integer> ] now also gives
the correct answer when the result is “empty”, i.e., all
zero or false.

large "dspMatrix" and "dtpMatrix" objects can
now be constructed via new(*, Dim = *, x = *) also when
length(x) is larger than 2^31 (as the C internal
validation method no longer suffers from integer overflow).

More PROTECT()ing to be “rather safe than
sorry” thanks to Tomas Kalibera's check tools.

Changes in version 1.2-12 (2017-11-10, svn r3239)

New Features

crossprod(x,y) and kronecker(x,y) have become
considerably more efficient for large "indMatrix" objects
x, y, thanks to private nudging by Boris Vaillant.

Bug Fixes

(R-forge Matrix bug #6185): c < 0 now also works for
derived sparse Matrices (which only contain Matrix
classes); via improving hidden MatrixClass(). Part of
such derived matrices only work in R >= 3.5.0.

using Authors@R in ‘../DESCRIPTION’ to list all
contributors.

solve(-m) no longer should use a cached Cholesky
factorization (of m).

Changes in version 1.2-11 (2017-08-10, svn r3225)

New Features

S4 method dispatch no longer emits ambiguity
notes (by default) for everybody, apart from the package
maintainer. You can reactivate them by
options(Matrix.ambiguityNotes = TRUE)

Bug Fixes

rankMatrix(<matrix of all 0>) now gives zero for all
methods, as it should be.

no longer calling length(NULL) <- <positive> which
has been deprecated in R-devel since July.

Bug Fixes

S[sel,] <- value and similar no longer segfault, but
give a "not (yet?) supported" error
for sparse matrices S and logical sel when
sel contains NAs.

The same error (instead of a low-level one) is signalled for
indexing (with NA-containing logical sel), i.e.,
S[sel,].

which(x, arr.ind=TRUE, *) (when x is a
"lMatrix" or "nMatrix") now works the same as
base::which, obeying an optional useNames argument
which defaults to TRUE. Previously, the resulting
two-column matrix typically had empty dimnames.

Changes in version 1.2-8 (2017-01-16, svn r3201)

New Features

C-API: SuiteSparse_long is now defined as
int64_t on all platforms, and we now include (C99) ‘inttypes.h’

Bug Fixes

x[.] <- value now also works for
"sparseVector"'s, both as x and as value.

x[FALSE] <- value now also works for "sparseVector"'s.

rep(x, *) now works for "sparseVector"s and
sparse and dense "Matrix"-classed matrices x.

solve(<sparse_LU>) no gives an error in some cases of
singular matrices, where before the C code accessed illegal memory locations.

Changes in version 1.2-7.1 (2016-08-29, svn r3187)

in C code, protect _POSIX_C_SOURCE by #ifdef __GLIBC__

Changes in version 1.2-7 (2016-08-27, svn r3185)

New Features

cBind() and rBind() have been almost silently
deprecated in R>= 3.2.0 and now give a warning,
“once per session” only.

bandSparse(*, k=k, *) now returns matrices inheriting from
"triangularMatrix" when obvious from the diagonal indices k.

Bug Fixes

KhatriRao(X,Y) now also works when X or
Y is completely zero.

Changes in version 1.2-6 (2016-04-27, svn r3175)

Bug Fixes

The 0-dim. Matrix multiplication fix in 1.2-5 did trigger
wrong warnings in other diagonal matrix multiplications.

Changes in version 1.2-5 (2016-04-14, svn r3170)

New Features

isSymmetric(m) now also works for "indMatrix"m.

isSymmetric(m) is faster for large dense asymmetric matrices.

Bug Fixes

Matrix multiplications (A %*% B) now work correctly
when one of the matrices is diagonal and the other has a zero dimension.

Changes in version 1.2-4 (2016-02-29, svn r3162)

New Features

sparseMatrix() gets new argument triangular
and a smarter default for dims when symmetric or
triangular is true.

as(<sparse>, "denseMatrix") now works in more cases
when prod(dim(.)) is larger than 2^{31} - 1.
Hence, e.g., !S now works for much larger sparse matrices
S.

Bug Fixes

creating very large dense matrices, e.g., by
as(<sparseM.>, "matrix") would segfault (in case it could
allocate enough storage).

Changes in version 1.2-3 (2015-11-19, svn r3155)

New Features

MatrixClass() is exported now.

More exports of semi-internal functions (for speed, named
".<foo>", i.e., inofficial API), such as .solve.dgC.lu().

more Korean translations

Bug Fixes

Packages linking to Matrix (LinkingTo:
in ‘DESCRIPTION’) now find
alloca properly defined in ‘Matrix.h’ even for non-GNU
compilation environments such as on Solaris or AIX.

extended "n?CMatrix" classes (e.g., from setClass(.,
contains="ngCMatrix")) now can be coerced via as(.) to
"d.CMatrix".

The printing of largish sparse matrices is improved, notably
in the case where columns are suppressed, via new fitWidth =
TRUE option in printSpMatrix2().

cbind2() and rbind2() no longer fail to
determine sparse when it is unspecified and hence
NA, fixing R-forge bug #6259.

Changes in version 1.2-2 (2015-07-03, svn r3131)

New Features

Explicitly import from “base” packages such as "stats".

Bug Fixes

Our colSums(x), rowMeans(y), ..., methods
now “keep names”, i.e., if the result is a numeric vector,
and the matrix x has column or row names, these become the
names(.) of the result, fixing R-forge bug #6018.

Changes in version 1.2-1 (2015-05-30, svn r3127)

New Features

"Matrix" now has an initialization() method
coercing 0-length dimnames components to NULL and other
non-NULL dimnames to character. Before, e.g.,
numeric dimnames components partially worked, even though it has
always been documented that non-NULL dimnames should be
character.

For symmetricMatrix objects which have symmetrical
dimnames by definition, it is allowed to only set one half of the
dimnames to save storage, e.g., list(NULL, nms) is
semantically equivalent to list(nms, nms).

as.vector(<sparseVector>) etc, now work, too.

lu(<sparseMatrix>) now keeps dimnames.

better ‘NEWS.Rd’ (which pleases Kurt and tidy ;-)

Bug Fixes

S[] <- T and S[] <- spV now work (in more cases)
for sparse matrices S, T and sparseVector spV.

Huge dense matrix multiplication did lead to segfaults, see
R-help, “does segfault mean (always) a bug?”, May 5, 2015.
Fixed by using C's Alloca() only in smallish cases.

Optional arguments in image(), e.g., main=
<..>) now also work for lgCMatrix, nMatrix etc;
thanks to a 4.5 years old report by Mstislav Elagin.

dimnames(A) <- val now resets the factors slot
to empty, as the factorizations now keep dimnames more often.

crossprod(<matrix>, Diagonal(<n>)) works again (and
these are tested more systematically).

Matrix products (%*%, crossprod, and
tcrossprod) for "dtrMatrix" are correct in all
cases, including keeping dimnames.

Matrix(d) (and other coercions to "Matrix")
now correctly keeps dimnames also when d is a
traditional diagonal"matrix".

Changes in version 1.1-2 (2014-01-28, svn r2962)

New Features

Bug Fixes

matrix products now (mostly) work with sparseVectors;
and correctly in some more cases.

Changes in version 1.1-1.1 (2013-12-30, svn r2957)

Testing code's assertWarning() adapted for R ≤ 3.0.1.

Depends: R >= 2.15.2 eases checking.

Changes in version 1.1-1 (2013-12-28)

New Features

image(.., xlim, ylim): nicer defaults
for the axis limits, and ylim is sorted decreasingly; not
strictly back-compatible but should never harm.

rankMatrix(*, method="qr") now using tol

T2graph() and graph2T() export old functionality explicitly.
Tweaks in conversions between "graph" and
"sparseMatrix" objects. Notably, as(<graph>,
<Matrix>) now more often returns a (0/1 pattern) "n..Matrix".

sparseMatrix(): new use.last.ij argument.

Bug Fixes

KhatriRao(): fix rownames (X <-> Y)

qr.coef(), qr.fitted, and qr.resid now
also work with sparse RHS y.

sparse matrix “sub assignments”, e.g., M[ii] <- v,
speedup and fixes.

bug fixes also in M[negative indices] <- value and
<sparseMatrix>[cbind(i,j)].

Changes in version 1.1-0 (2013-10-21, svn r2930)

New Features

fac2sparse and fac2Sparse now exported, with a
new giveCsparse option.

Changes in version 1.0-14 (2013-09-12, svn r2907)

Bug Fixes

Changes in version 1.0-13 (2013-09-10, svn r2904)

New Features

New (efficient) KhatriRao() function by Michael Cysouw

New "indMatrix" class of “index matrices”, a
generalization of "pMatrix", the permutation matrices, many
methods generalized from pMatrix to indMatrix. All (initial)
functionality contributed by Fabian Scheibl, Univ. Munich.

Export and document isDiagonal() and
isTriangular() as they are useful outside of Matrix.

rankMatrix(M, method="qr") no longer needs
sval which makes it considerably more useful for large
sparse M.

Start providing anyNA methods for R >= 3.1.0.

solve(<sparse> a, <sparse> b): if a is
symmetric, now compute sparse result.

nearPD() gets new option conv.norm.type = "I".

determinant(<dpoMatrix>) now uses chol(), and
hence also an existing (‘cached’) Cholesky factor.

3 new C -> R utilities (including hidden R function
.set.factors() for caching also from R, not just in C).