dostats | R Documentation |
Convenient interface for computing statistics on a vector
dostats(x, ..., .na.action = na.fail)
x |
the vector |
... |
statistics to compute, must take a vector and return a vector |
.na.action |
the action to take on NA values, for all statistics |
A one row data.frame
with columns named as in ...
ldply
data(mtcars) library(plyr) dostats(1:10, mean, median, sd, quantile, IQR) ldply(mtcars, dostats, median, mean, sd, quantile, IQR)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.