# NOT RUN {
data(sat.act)
describeBy(sat.act,sat.act$gender) #just one grouping variable
describeBy(sat.act ~ gender)
#describeBy(sat.act,list(sat.act$gender,sat.act$education)) #two grouping variables
describeBy(sat.act ~ gender + education) #two grouping variables
des.mat <- describeBy(sat.act$age,sat.act$education,mat=TRUE) #matrix (data.frame) output
des.mat <- describeBy(sat.act$age,list(sat.act$education,sat.act$gender),
mat=TRUE,digits=2) #matrix output
# }
Run the code above in your browser using DataLab