SCM

[#6581] Add sep="" option to model.Matrix?

Date:
2018-05-02 20:15
Priority:
3
State:
Open
Submitted by:
Vitalie Spinu (spinuvit)
Assigned to:
Martin Maechler (mmaechler)
Product:
None
Operating System:
None
Component:
None
Summary:
Add sep="" option to model.Matrix?

Detailed description

Would it be possible to add `sep=""` option for the term-component name?

In both, stats model.matrix and model.Matrix, collapsed factorlevels are hard to read and inconvenient to work with programmatically.

> df <- data.frame(y = 1:3, factor = c("level1", "level2", "level3"))
> model.Matrix(y ~ factor, df)
3 x 3 Matrix of class "ddenseModelMatrix"
(Intercept) factorlevel2 factorlevel3
1 1 0 0
2 1 1 0
3 1 0 1

Thanks!

Comments:

Message  ↓
Date: 2020-05-25 14:44
Sender: Martin Maechler

Moved from Bugs to Feature Requests

Date: 2020-05-25 14:44
Sender: Martin Maechler

this is a reasonal "Feature request" (not a bug), thank you. I'm at least assigning it to myself, finally,
and hope to get implementing it ASAP.

Attached Files:

Changes

Field Old Value Date By
typeBugs2020-05-25 14:44mmaechler
assigned_tonone2020-05-25 14:44mmaechler
details Would it be possible to add `sep=""` option for the term-component name? In both, stats model.matrix and model.Matrix, collapsed factorlevels are hard to read and inconvenient to work with programmatically. > df <- data.frame(y = 1:3, factor = c("level1", "level2", "level3")) > model.Matrix(y ~ factor, df) 3 x 3 Matrix of class "ddenseModelMatrix" (Intercept) factorlevel2 factorlevel3 1 1 0 0 2 1 1 0 3 1 0 1 Thanks!2020-05-25 14:44mmaechler
Thanks to:
Vienna University of Economics and Business Powered By FusionForge