Skip to content

Add summary in 'data' tab #36

@AuroreAA

Description

@AuroreAA

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')

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions