Description Usage Arguments Details Value Author(s) Examples
Create a customized function that calculates desired summary statistics for a vector of numerical input
1 |
stats |
A character vector of summary statistics. See details for acceptable values. |
The acceptable values of stats
are
minimum
first quartile (25th percentile)
mean
median (50th percentile)
third quartile (75th percentile)
maximum
standard deviation
sum
sum of squares
number of non-missing elements in the vector
skewness
kurtosis (Pearson's measure)
All statistics are calcuated such that if there are too many NAs
, an NA
is returned. The 'moments' package namespace is loaded if skew
or kurt
are requested.
A function of class summaryStats_function
that takes a single argument of a
numerical vector, and returns a named vector of the summary statistics of that vector
Landon Sego
1 2 3 | f <- summaryStats(c("q3","q1","mean","count","med"))
f
f(rnorm(200))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.