Description Usage Arguments Value Examples
This function provides descriptive statistics for a quantitative variable alone or seperately by groups. Any function that returns a single numeric value can bue used.
1 |
data |
data frame |
x |
numeric variable in data (unquoted) |
... |
list of grouping variables |
statistics |
statistics to calculate (any function that produces a
numeric value), Default: |
na.rm |
if |
digits |
number of decimal digits to print, Default: 2 |
a data frame, where columns are grouping variables (optional) and statistics
1 2 3 4 5 6 7 8 9 10 11 12 | # If no keyword arguments are provided, default values are used
qstats(mtcars, mpg, am, gear)
# You can supply as many (or no) grouping variables as needed
qstats(mtcars, mpg)
qstats(mtcars, mpg, am, cyl)
# You can specify your own functions (e.g., median,
# median absolute deviation, minimum, maximum))
qstats(mtcars, mpg, am, gear,
stats = c("median", "mad", "min", "max"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.