### Oneway anova with a plot
fanova(dat=mtcars, y='mpg', between='cyl', plot=TRUE);
### Factorial anova
fanova(dat=mtcars, y='mpg', between=c('vs', 'am'), plot=TRUE);
### Ancova
fanova(dat=mtcars, y='mpg', between=c('vs', 'am'), covar='hp');
### Don't run these examples to not take too much time during testing
### for CRAN
if (FALSE) {
### Repeated measures anova; first generate datafile
dat <- mtcars[, c('am', 'drat', 'wt')];
names(dat) <- c('factor', 't0_dependentVar' ,'t1_dependentVar');
dat$factor <- factor(dat$factor);
### Then do the repeated measures anova
fanova(dat, y=c('t0_dependentVar' ,'t1_dependentVar'),
between='factor', plot=TRUE);
}
Run the code above in your browser using DataLab