Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print names, if available, for mixed_units #172

Open
Enchufa2 opened this issue Aug 31, 2018 · 2 comments
Open

Print names, if available, for mixed_units #172

Enchufa2 opened this issue Aug 31, 2018 · 2 comments

Comments

@Enchufa2
Copy link
Member

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]
@edzer
Copy link
Member

edzer commented Aug 31, 2018

Yes, or maybe even like

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

?

@Enchufa2
Copy link
Member Author

Yeap, why not. Note that the alignment is somehow trickier due to the units. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants