How to perform an ANCOVA in R I want to perform an ANCOVA analysis of data concerning density of plant epiphytes. At first, I would like to know if there is any difference in plant density between two slopes, one N and one S, but I have other data such as altitude, canopy openness and height of the host plant. I know that my covariate would have to be the two slopes (N and S). I built this model that runs in R and although I have no idea if it performs well. Also I would like to know what the difference is if I use the symbol + or *.
model1 <- aov(density~slope+altitude+canopy+height)
summary(model1)
model1

 A: Here is a complementary documentation http://goo.gl/yxUZ1R of the procedure suggested by @Butorovich. In addition, my observation is that when the covariate is binary, using summary(lm.object) would give same IV estimate as generate by Anova(lm.object, type="III"). 
A: The basic tool for this is lm; note that aov is a wrapper for lm. 
In particular, if you have some grouping variable (factor), $g$, and a continuous covariate $x$, the model y ~ x + g would fit a main effects ANCOVA model, while y ~ x * g would fit a model which includes interaction with the covariate. aov will take the same formulas.
Pay particular attention to the Note in the help on aov.
As for + vs *, russellpierce  pretty much covers it, but I'd recommend you look at ?lm and ?formula and most especially section 11.1 of the manual An Introduction to R that comes with R (or you can find it online if you haven't figured out how to find it on your computer; most easily, this involves finding the "Help" pull down menu in either R or RStudio).
A: I recommend getting and reading Discovering Statistics using R by Field. He has a nice section on ANCOVA.
To run ANCOVA in R load the following packages:  
car
compute.es
effects
ggplot2
multcomp
pastecs
WRS

If you are using lm or aov (I use aov) make sure that you set the contrasts using the "contrasts" function before doing either aov or lm. R uses non-orthogonal contrasts by default which can mess everything up in an ANCOVA. If you want to set orthogonal contrasts use:
contrasts(dataname$factorvariable)=contr.poly(# of levels, i.e. 3) 

then run your model as 
model.1=aov(dv~covariate+factorvariable, data=dataname)

To view the model use:
Anova(model.1, type="III") 

Make sure you use capital "A" Anova here and not anova. This will give results using type III SS. 
summary.lm(model.1) will give another summary and includes the R-sq. output.  
posth=glht(model.1, linfct=mcp(factorvariable="Tukey"))  ##gives the post-hoc Tukey analysis
summary(posth) ##shows the output in a nice format.

If you want to test for homogeneity of regression slopes you can also include an interaction term for the IV and covariate. That would be:  
model=aov(dv~covariate+IV+covariate:IV, data=dataname)

If the interaction term is significant then you do not have homogeneity.
