How does one do a Type-III SS ANOVA in R with contrast codes? Please provide R code which allows one to conduct a between-subjects ANOVA with -3, -1, 1, 3 contrasts.  I understand there is a debate regarding the appropriate Sum of Squares (SS) type for such an analysis.  However, as the default type of SS used in SAS and SPSS (Type III) is considered the standard in my area.  Thus I would like the results of this analysis to match perfectly what is generated by those statistics programs.  To be accepted an answer must directly call aov(), but other answers may be voted up (espeically if they are easy to understand/use).
sample.data <- data.frame(IV=rep(1:4,each=20),DV=rep(c(-3,-3,1,3),each=20)+rnorm(80))

Edit: Please note, the contrast I am requesting is not a simple linear or polynomial contrast but is a contrast derived by a theoretical prediction, i.e. the type of contrasts discussed by Rosenthal and Rosnow.
 A: When you are doing contrasts, you are doing a specific, stated linear combination of cell means within the context of the appropriate error term. As such, the concept of "Type of SS" is not meaningful with contrasts. Each contrast is essentially the first effect using a Type I SS. "Type of SS" has to do with what is partialled out or accounted for by the other terms. For contrasts, nothing is partialled out or accounted for. The contrast stands by itself.
A: The fact that type III tests are used in your place of work is the weakest of reasons to keep using them.  SAS has done major damage to statistics in this regard.  Bill Venables' exegesis, referenced above, is a great resource on this.  Just say no to type III; it's based on a faulty notion of balance and has lower power because of silly weighting of cells in the imbalanced case.
A more natural and less error-prone way to get general contrasts, and to be able to describe what you did, is provided by the R rms package contrast.rms function.  Contrasts can be very complex but to the user are very simple because they are stated in terms of differences in predictive values.  Tests and simultaneous contrasts are supported.  This handles nonlinear regression effects, nonlinear interaction effects, partial contrasts, all kinds of things.
A: Try the Anova command in the car library.  Use the type="III" argument, as it defaults to type II. For example:
library(car)
mod <- lm(conformity ~ fcategory*partner.status, data=Moore, contrasts=list(fcategory=contr.sum, partner.status=contr.sum))
Anova(mod, type="III")

A: Type III sum of squares for ANOVA are readily available through the Anova() function from the car package.
Contrast coding can be done in several ways, using C(), the contr.* family (as indicated by @nico), or directly the contrasts() function/argument. This is detailed in §6.2 (pp. 144-151) of Modern Applied Statistics with S (Springer, 2002, 4th ed.). Note that aov() is just a wrapper function for the lm() function. It is interesting when one wants to control the error term of the model (like in a within-subject design), but otherwise they both yield the same results (and whatever the way you fit your model, you still can output ANOVA or LM-like summaries with summary.aov or summary.lm). 
I don't have SPSS to compare the two outputs, but something like
> library(car)
> sample.data <- data.frame(IV=factor(rep(1:4,each=20)),
                            DV=rep(c(-3,-3,1,3),each=20)+rnorm(80))
> Anova(lm1 <- lm(DV ~ IV, data=sample.data, 
                  contrasts=list(IV=contr.poly)), type="III")
Anova Table (Type III tests)

Response: DV
            Sum Sq Df F value    Pr(>F)    
(Intercept)  18.08  1  21.815  1.27e-05 ***
IV          567.05  3 228.046 < 2.2e-16 ***
Residuals    62.99 76                      
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 

is worth to try in first instance.
About factor coding in R vs. SAS: R considers the baseline or reference level as the first level in lexicographic order, whereas SAS considers the last one. So, to get comparable results, either you have to use contr.SAS() or to relevel() your R factor.
A: You may want to have a look at this blog post:
Obtaining the same ANOVA results in R as in SPSS - the difficulties with Type II and Type III sums of squares
(Spoiler: add options(contrasts=c("contr.sum", "contr.poly")) at the beginning of your script)
A: Also self-promoting, I wrote a function for exactly this: https://github.com/samuelfranssens/type3anova
Install as follows:
library(devtools)
install_github(samuelfranssens/type3anova)
library(type3anova)

sample.data <- data.frame(IV=rep(1:4,each=20),DV=rep(c(-3,-3,1,3),each=20)+rnorm(80))

type3anova(lm(DV ~ IV, data = sample.data))

You will also need to have the car package installed.
