Skip to content

Print names, if available, for mixed_units #172

@Enchufa2

Description

@Enchufa2

Motivation: coef(object) returns coefficients of a fitted object as a named vector, e.g.:

(Intercept)           t      I(t^2)
   3.373459    1.909901    1.006140

If we eventually implement wrappers for linear regressions, coefficients should be returned as a list, because in general these have different units, e.g.:

$`(Intercept)`
3.373459 [m]

$t
1.909901 [m/s]

$`I(t^2)`
1.006140 [m/s^2]

It would be better to set them as mixed_units and print the names, if available, with print.mixed_units. In this case, it should look like this:

Mixed units: [m] (1), [m/s] (1), [m/s^2] (1) 
(Intercept)               t            I(t^2)
   3.373459 [m]    1.909901 [m/s]    1.006140 [m/s^2]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions