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

Order of note not respected #577

Closed
sondalex opened this issue Dec 5, 2022 · 2 comments
Closed

Order of note not respected #577

sondalex opened this issue Dec 5, 2022 · 2 comments

Comments

@sondalex
Copy link

sondalex commented Dec 5, 2022

modelsummary::modelsummary does not report notes in order.
The order of the vector or list passed to argument note is not respected.

Example:

library(modelsummary)
url <- 'https://vincentarelbundock.github.io/Rdatasets/csv/HistData/Guerry.csv'
dat <- read.csv(url)

models <- list(
  "OLS 1"     = lm(Donations ~ Literacy + Clergy, data = dat)
)
modelsummary(models,
  estimate = "{estimate}{stars}", note = c(
  "* Significant at 10% level", 
  "** Significant at 5% level", "*** Significant at 1% level")
)

The output ( tested on Ubuntu 22.04 - Last main branch + last cran version)

OLS 1
(Intercept) 7948.667***
(2078.276)
Literacy −39.121
(37.052)
Clergy 15.257
(25.735)
Num.Obs. 86
R2 0.020
R2 Adj. −0.003
AIC 1740.8
BIC 1750.6
Log.Lik. −866.392
RMSE 5740.99
* Significant at 10% level
*** Significant at 5% level
*** Significant at 1% level
vincentarelbundock added a commit that referenced this issue Dec 5, 2022
@vincentarelbundock
Copy link
Owner

vincentarelbundock commented Dec 5, 2022

Thanks a lot for the report and the clear reprex!

This should not be fixed in the Github development version.

@sondalex
Copy link
Author

sondalex commented Dec 6, 2022

Thank you for your quick fix !

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

No branches or pull requests

2 participants