| overview | R Documentation |
summary() inspired by the skimr packageA cheaper summary() function, designed for larger data.
overview(x, digits = getOption("cheapr.digits", 2), ...)
## Default S3 method:
overview(x, digits = getOption("cheapr.digits", 2), ...)
## S3 method for class 'logical'
overview(x, digits = getOption("cheapr.digits", 2), ...)
## S3 method for class 'integer'
overview(x, digits = getOption("cheapr.digits", 2), hist = TRUE, ...)
## S3 method for class 'numeric'
overview(x, digits = getOption("cheapr.digits", 2), hist = TRUE, ...)
## S3 method for class 'integer64'
overview(x, digits = getOption("cheapr.digits", 2), hist = TRUE, ...)
## S3 method for class 'character'
overview(x, digits = getOption("cheapr.digits", 2), ...)
## S3 method for class 'factor'
overview(x, digits = getOption("cheapr.digits", 2), ...)
## S3 method for class 'Date'
overview(x, digits = getOption("cheapr.digits", 2), ...)
## S3 method for class 'POSIXt'
overview(x, digits = getOption("cheapr.digits", 2), ...)
## S3 method for class 'ts'
overview(x, digits = getOption("cheapr.digits", 2), ...)
## S3 method for class 'zoo'
overview(x, digits = getOption("cheapr.digits", 2), ...)
## S3 method for class 'data.frame'
overview(x, digits = getOption("cheapr.digits", 2), hist = TRUE, ...)
x |
A vector or data frame. |
digits |
How many decimal places should the summary statistics be printed as? Default is 2. |
... |
Further arguments passed onto methods. Currently unused. |
hist |
Should in-line histograms be returned? Default is |
No rounding of statistics is done except in printing which can be controlled
either through the digits argument in overview(), or by setting the
option options(cheapr.digits).
To access the underlying data, for example the numeric summary,
just use $numeric, e.g. overview(rnorm(30))$numeric.
An object of class "overview". Under the hood this is just a list of data frames. Key summary statistics are reported in each data frame.
library(cheapr)
overview(iris)
# With histograms
overview(airquality, hist = TRUE)
# Round to 0 decimal places
overview(airquality, digits = 0)
# We can set an option for all overviews
options(cheapr.digits = 1)
overview(rnorm(100))
options(cheapr.digits = 2) # The default
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.