| Title: | Modern Data Summaries and Diagnostic Reports for Statistical Analysis |
|---|---|
| Description: | Provides robust, NA-aware data summaries, variable diagnostics, normality decisions, missingness and outlier checks, and reproducible diagnostic report scaffolding for statistical analysis. DataSum is designed for researchers, professors, scientists, and analysts who need trustworthy first-pass insight into tabular data before modeling or publication. |
| Authors: | Uzair Javid Khan [aut, cre], Immad Ahmad Shah [aut], Sukhdev Mishra [aut] |
| Maintainer: | Uzair Javid Khan <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 1.0.0 |
| Built: | 2026-10-14 19:08:22 UTC |
| Source: | https://github.com/uzairkhan11w/datasum |
DataSum provides robust, NA-aware summaries, data profiles, normality diagnostics, outlier checks, reproducible report scaffolding, and an optional Shiny app for statistical data inspection.
summarize_vector(), summarize_data(), profile_data(), datasum_report(), run_datasum_app()
Creates a self-contained Quarto source file containing dataset diagnostics, variable summaries, warnings, and formula definitions. Set render = TRUE to render the report through the optional quarto package.
datasum_report( data, path = NULL, format = c("qmd", "html", "pdf", "docx"), title = "DataSum Diagnostic Report", by = NULL, alpha = 0.05, digits = 3, render = FALSE )datasum_report( data, path = NULL, format = c("qmd", "html", "pdf", "docx"), title = "DataSum Diagnostic Report", by = NULL, alpha = 0.05, digits = 3, render = FALSE )
data |
A data frame or tibble. |
path |
Output path. When |
format |
One of |
title |
Report title. |
by |
Optional grouping columns passed to |
alpha |
Significance level for normality decisions. |
digits |
Optional number of digits used to round numeric output. |
render |
Logical; if |
The generated file path, invisibly.
report <- datasum_report(iris, render = FALSE) file.exists(report)report <- datasum_report(iris, render = FALSE) file.exists(report)
Builds a dataset-level profile containing variable summaries, dataset shape, missingness, duplicate-row counts, type counts, and warnings that deserve analyst attention.
profile_data(data, by = NULL, alpha = 0.05, digits = NULL)profile_data(data, by = NULL, alpha = 0.05, digits = NULL)
data |
A data frame or tibble. |
by |
Optional grouping columns passed to |
alpha |
Significance level for normality decisions. |
digits |
Optional number of digits used to round numeric output. |
A datasum_profile list with dataset, summary, and warnings.
profile <- profile_data(iris) profile$datasetprofile <- profile_data(iris) profile$dataset
Opens an interactive Shiny interface for uploading a CSV file, inspecting dataset diagnostics, visualizing a selected variable, and downloading a reproducible DataSum report source file.
run_datasum_app(data = NULL)run_datasum_app(data = NULL)
data |
Optional data frame used as the starting dataset. If omitted, the app starts with |
A Shiny application object.
if (requireNamespace("shiny", quietly = TRUE)) { app <- run_datasum_app(iris) }if (requireNamespace("shiny", quietly = TRUE)) { app <- run_datasum_app(iris) }
Applies summarize_vector() to every column in a data frame. Optional grouped summaries are supported by passing one or more grouping column names to by.
summarize_data(data, by = NULL, alpha = 0.05, digits = NULL)summarize_data(data, by = NULL, alpha = 0.05, digits = NULL)
data |
A data frame or tibble. |
by |
Optional character vector of grouping columns. |
alpha |
Significance level for normality decisions. |
digits |
Optional number of digits used to round numeric output. |
A data.frame, one row per summarized variable and group.
summarize_data(iris) summarize_data(iris, by = "Species")summarize_data(iris) summarize_data(iris, by = "Species")
Computes a one-row, NA-aware diagnostic summary for one vector. Numeric vectors receive robust and classical statistics, outlier counts, and a normality diagnostic. Non-numeric vectors receive safe type, missingness, uniqueness, and mode summaries.
summarize_vector(x, name = NA_character_, alpha = 0.05, digits = NULL)summarize_vector(x, name = NA_character_, alpha = 0.05, digits = NULL)
x |
A vector. |
name |
Optional variable name to store in the |
alpha |
Significance level for the normality decision. Defaults to 0.05. |
digits |
Optional number of digits used to round numeric output. By default, numeric values are not rounded. |
A one-row data.frame with summary statistics and diagnostics.
summarize_vector(c(1, 2, 2, NA, 5), name = "score") summarize_vector(factor(c("control", "treatment", "control")))summarize_vector(c(1, 2, 2, NA, 5), name = "score") summarize_vector(factor(c("control", "treatment", "control")))