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

Add summary in 'data' tab #36

Open
AuroreAA opened this issue Oct 18, 2023 · 0 comments
Open

Add summary in 'data' tab #36

AuroreAA opened this issue Oct 18, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@AuroreAA
Copy link
Collaborator

It would be nice to add a summary below or above the display of the data to have a better understanding of the data.
I suggest either gt_plt_summary() from gtExtras or dfSummary() from summarytools.

# Option 1: gtExtras
library(gtExtras)
data("iris")
gt_plt_summary(iris)

# not possible to customize easily with min and max


# Option 2: summarytools
library(summarytools)
print(dfSummary(iris),  method = 'view')
# you have also the "render" method to have in LaTeX or Markdown files

# You can customize a lot
#options for summary tables
st_options(bootstrap.css     = FALSE,       # Already part of the theme so no need for it
           plain.ascii       = FALSE,       # One of the essential settings
           style             = "rmarkdown", # Idem.
           dfSummary.silent  = TRUE,        # Suppresses messages about temporary files
           footnote          = NA,          # Keeping the results minimalistic
           subtitle.emphasis = TRUE,
           dfSummary.varnumbers = FALSE, # This keeps results narrow enough
           dfSummary.valid.col = FALSE, # For the vignette theme, this gives better results.
           # For other themes, using TRUE might be preferable.
)
print(dfSummary(iris, graph.magnif = 0.75, col.widths = c(
  "5%",  # varnames
  "10%", # stats/Values
  "5%", # freqs
  "5%", # graph
  "5%"   # missing
)), 
max.tbl.height = 600, method = 'view')
@AuroreAA AuroreAA added the enhancement New feature or request label Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants