R aov Function. aov() function is for analysis of variance (ANOVA). aov(formula, data=NULL, ...) formula : a formula specifying the model. data : the data frame containing the variables specified in the formula.