SCM

[#6616] Matrix::Matrix does not retain the correct rownames

View Trackers | Bugs | Download .csv | Monitor

Date:
2019-03-07 18:11
Priority:
3
State:
Closed
Submitted by:
Robrecht Cannoodt (rcannood)
Assigned to:
Martin Maechler (mmaechler)
Hardware:
All
Product:
None
Operating System:
Linux
Component:
None
Version:
None
Severity:
None
Resolution:
Fixed
 
URL:
Summary:
Matrix::Matrix does not retain the correct rownames

Detailed description
The bug is simple to reproduce:


> m <- matrix(1, dimnames = list("a", "b"))
> Matrix::Matrix(m, sparse = TRUE)
1 x 1 sparse Matrix of class "dsCMatrix"
b
b 1

I encountered this problem with Matrix v 1.2-15.

Followup

Message
Date: 2019-03-11 14:23
Sender: Martin Maechler

Your guess is correct: The bug is in R's isSymmetric(.) which is wrong here
[only for 1x1 matrices with asymmetric dimnames].

Hence a bug in R -- which I now have fixed in the R sources.
But "of course" it's still present in R 3.5.3 which was released today.

As this is a border case, I don't think we should establish a workaround (of the R bug) in Matrix.
Date: 2019-03-07 18:16
Sender: Robrecht Cannoodt

I guess the problem is that isSymmetric(m) is TRUE. I would argue that the above scenario is undesired though, because it results in unexpected errors in certain edge cases.

Attached Files:

Changes:

Field Old Value Date By
ResolutionNone2019-03-11 14:23mmaechler
assigned_tonone2019-03-11 14:23mmaechler
close_dateNone2019-03-11 14:23mmaechler
status_idOpen2019-03-11 14:23mmaechler
Thanks to:
Vienna University of Economics and Business University of Wisconsin - Madison Powered By FusionForge