This help topic is for R version 0.60. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/base/html/contrasts.html
contrasts {base}R Documentation

Get and Set Contrast Matrices

Usage

contrasts(x)
contrasts(x) <- ctr

Arguments

x

a factor.

ctr

either a matrix whose columns give coefficients for contrasts in the levels of x, or the (quoted) name of a function which computes such matrices.

Value

These functions are used to set and view the contrasts associated with a factor. If contrasts are not set for a factor the default functions named the system options are used.

See Also

contr.helmert, contr.poly, contr.sum, contr.treatment, glm, lm.


[Package base version 0.60 ]