dat <- data.frame(
x = rnorm(10),
y = rnorm(10)
)
## Calculate 0.025, 0.975 quantiles for each column in a data.frame,
## and return result as data.frame .
dapply( dat, function(x) {
quantile(x, c(0.025, 0.975))
} )
dapply( dat, summary )
str( dapply( dat, summary ) )
Run the code above in your browser using DataLab