tidysummary | R Documentation |
Create a summary (small, medium or large) of a data frame.
tidysummary(x, size = "small", digits = 2)
x |
a |
size |
how large the summary should be. Either |
digits |
the number of decimal places for rounding. Can be
an integer or |
The returned data frame has the following columns:
column | Name of the column |
n | Number of observations |
class | Data type |
min | Minimum value |
max | Maximum value |
mean | Mean value |
sd | Standard deviation |
unique | Number of unique values (includes NA ) |
median | Median value |
na | Number of NA s (missing values) |
mode | Most frequent value |
quant25 | 25 percent quantile |
quant75 | 75 percent quantile |
levels | Number of factor levels (only relevant for factors) |
head | Top (first) value of the data frame |
tail | Bottom (last) value of the data frame |
se | Standard error |
skewness | Skewness |
kurtosis | Kurtosis |
bytes | Size in bytes of the memory usage of the column |
Note:
For character vectors, the text length will be used to calculate the statistics.
Missing values will be automatically removed before any statistical summaries are calculated
Statistical summaries are produced using base R functions with defaults. Kurtosis and skewness is produced using code adapted from the moments package (https://cran.r-project.org/web/packages/moments/index.html).
A data frame with one row per column.
to_markdown()
,
to_latex()
,
to_html()
,
to_json()
,
to_csv()
,
to_excel()
# Summary for data frame tidysummary(iris) tidysummary(iris, "medium") tidysummary(iris, digits=2) # Summary for atomic vector tidysummary(iris$Sepal.Length, "large") # Convert summary to Markdown output <- tidysummary(iris) to_markdown(output)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.