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

clean up extraneous tibble output #185

Open
bob-carpenter opened this issue Jul 26, 2021 · 3 comments
Open

clean up extraneous tibble output #185

bob-carpenter opened this issue Jul 26, 2021 · 3 comments
Labels
feature New feature or request good first issue Good for newcomers

Comments

@bob-carpenter
Copy link

bob-carpenter commented Jul 26, 2021

The current summary output looks like this:

> fit_hmc$summary(c("mu", "tau"))

# A tibble: 2 x 10
  variable    mean  median     sd    mad     q5     q95  rhat ess_bulk ess_tail
  <chr>      <dbl>   <dbl>  <dbl>  <dbl>  <dbl>   <dbl> <dbl>    <dbl>    <dbl>
1 mu       -0.0825 -0.0771 0.0140 0.0158 -0.101 -0.0665  1.97     2.03     18.1
2 tau       8.22    8.15   0.269  0.325   7.88   8.64    2.12     1.87     12.4

It also prints negative numbers in red. I can remove the red negative numbers with a global option:

> options(pillar.neg = FALSE)

I haven't been able to see how to get rid of the other output I consider to be extraneous:

  1. the line saying it's a tibble (# A tibble: 2 x 10)
  2. the line providing types: (<chr> <dbl> ...)
  3. row numbers (1 for mu, 2 for tau)

P.S. This is low priority, especially if it's a huge pain to provide alternative tibble output.

@bob-carpenter bob-carpenter added feature New feature or request good first issue Good for newcomers labels Jul 26, 2021
@avehtari
Copy link
Collaborator

I would also like to have prettier output. In notebooks I'm now testing using lemon package, which with simple addition to code block options changes the output to look like
image

It's not a perfect solution as changing, e.g. the width requires additional tricks.

@mjskay
Copy link
Collaborator

mjskay commented Sep 16, 2021

If someone wants to tackle this a good place to start might be the methods for customizing tibble printing (since we are already using tibbles): https://pillar.r-lib.org/articles/extending.html

@paul-buerkner
Copy link
Collaborator

How relevant will this issue still be in light of implementing #257?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants