dostats {dostats}R Documentation

Convenient interface for computing statistics on a vector

Description

Convenient interface for computing statistics on a vector

Usage

dostats(x, ..., .na.action = na.fail)

Arguments

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

Value

A one row data.frame with columns named as in ...

See Also

ldply

Examples

data(mtcars)
library(plyr)
dostats(1:10, mean, median, sd, quantile, IQR)
ldply(mtcars, dostats, median, mean, sd, quantile, IQR)

[Package dostats version 1.3.3 Index]