I'll use the built-in mtcars as an example. We'll take cyl as the treatment variable.
library(vtable)
st(mtcars, group = "cyl", add.median = TRUE)
What, that's it? Well, not really. In the R spirit of lazy evaluation I weighed doing this manually versus finding a package for what is really a very common task and learning how to use it. It started with a search of summary statistics on rseek.
I could have done this in base{} simply by
apply(mtcars[which(mtcars$cyl == 4),-2],2,sd)
#> mpg disp hp drat wt qsec vs
#> 4.5098277 26.8715937 20.9345300 0.3654711 0.5695637 1.6824452 0.3015113
#> am gear carb
#> 0.4670994 0.5393599 0.5222330
for the 4 cyl treatment sd.