SCM

[#6732] Sparse vector class description shows numeric indices

Date:
2021-06-25 22:22
Priority:
3
State:
Closed
Submitted by:
David Cortes (david.cortes)
Assigned to:
Nobody (None)
Hardware:
None
Product:
None
Operating System:
None
Component:
None
Version:
None
Severity:
None
Resolution:
Invalid
URL:
Summary:
Sparse vector class description shows numeric indices

Detailed description
When doing 'showClass("sparseVector")' and derived types, it will show the indices of the vector as being of numeric type, but they are of integer type in objects of instantiable classes.

> showClass("dsparseVector")
Class "dsparseVector" [package "Matrix"]

Slots:

Name: x length i
Class: numeric numeric numeric

Extends:
Class "sparseVector", directly
Class "xsparseVector", directly
Class "replValueSp", by class "sparseVector", distance 2

> class(as(matrix(), "sparseVector")@i)
[1] "integer"

Comments:

Message  ↓
Date: 2021-06-26 11:53
Sender: Martin Maechler

"integer" is one (of two) kind of "numeric".

This is all very much on purpose. Please ask on R-help (or another e-mail venue) if you need more explanation.

Attached Files:

Changes

Field Old Value Date By
status_idOpen2021-06-26 11:53mmaechler
close_dateNone2021-06-26 11:53mmaechler
ResolutionNone2021-06-26 11:53mmaechler
Thanks to:
Vienna University of Economics and Business Powered By FusionForge