SCM

[#6655] missing integrity check for MTX

Date:
2020-02-03 16:15
Priority:
3
State:
Open
Submitted by:
Alexey U (alexeyuv)
Assigned to:
Nobody (None)
Hardware:
None
Product:
None
Operating System:
None
Component:
None
Version:
None
Severity:
None
Resolution:
None
URL:
Summary:
missing integrity check for MTX

Detailed description
If the number of non-zero elements stated in the MTX file header
does not match
the number of elements in the file,
no error or warning is generated.

readMM uses scan(..., nmax = nz), but does not check
if nz coincides with the number of elements read from the file.

Example:

mtx <-
"%%MatrixMarket matrix coordinate integer general
%
3 3 9
1 1 1
1 2 1"

Matrix::readMM(textConnection(mtx)) # <- NO error or warning

Best,
Alex

Comments:

No Comments Have Been Posted

Attached Files:

Changes

No Changes Have Been Made to This Item

Thanks to:
Vienna University of Economics and Business Powered By FusionForge