View source: R/report.data.frame.R
report.character | R Documentation |
Create reports for data frames.
## S3 method for class 'character'
report(
x,
n_entries = 3,
levels_percentage = "auto",
missing_percentage = "auto",
...
)
## S3 method for class 'data.frame'
report(
x,
n = FALSE,
centrality = "mean",
dispersion = TRUE,
range = TRUE,
distribution = FALSE,
levels_percentage = "auto",
digits = 2,
n_entries = 3,
missing_percentage = "auto",
...
)
## S3 method for class 'factor'
report(x, levels_percentage = "auto", ...)
## S3 method for class 'numeric'
report(
x,
n = FALSE,
centrality = "mean",
dispersion = TRUE,
range = TRUE,
distribution = FALSE,
missing_percentage = "auto",
digits = 2,
...
)
x |
The R object that you want to report (see list of of supported objects above). |
n_entries |
Number of different character entries to show. Can be "all". |
levels_percentage |
Show characters entries and factor levels by number or percentage. If "auto", then will be set to number and percentage if the length if n observations larger than 100. |
missing_percentage |
Show missing by number (default) or percentage. If "auto", then will be set to number and percentage if the length if n observations larger than 100. |
... |
Arguments passed to or from other methods. |
n |
Include number of observations for each individual variable. |
centrality |
Character vector, indicating the index of centrality
(either |
dispersion |
Show index of dispersion (sd if |
range |
Show range. |
distribution |
Show kurtosis and skewness. |
digits |
Number of significant digits. |
An object of class report()
.
r <- report(iris,
centrality = "median", dispersion = FALSE,
distribution = TRUE, missing_percentage = TRUE
)
r
summary(r)
as.data.frame(r)
summary(as.data.frame(r))
# grouped analysis using `{dplyr}` package
library(dplyr)
r <- iris %>%
group_by(Species) %>%
report()
r
summary(r)
as.data.frame(r)
summary(as.data.frame(r))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.