makeContrasts(..., contrasts=NULL, levels)
contrasts.fit
.
The contrasts can be specified either as expressions using ...
or as a character vector through contrasts
.
(Trying to specify contrasts both ways will cause an error.)The parameter names must be syntactically valid variable names in R and so, for example, must begin with a letter rather than a numeral.
See make.names
for a complete specification of what is a valid name.
makeContrasts(B-A,C-B,C-A,levels=c("A","B","C")) makeContrasts(contrasts="A-(B+C)/2",levels=c("A","B","C")) x <- c("B-A","C-B","C-A") makeContrasts(contrasts=x,levels=c("A","B","C"))