Extraction and replacement methods. The extraction method uses
getcoeffs() and the replacement method uses low-level helper
function c_overwrite().
In the extraction function a[index], if index is a list,
further arguments are ignored. If not, the dots are used.
Replacement methods using list-valued index, as in A[i] <-
value uses an ugly hack if value is zero.
Idiom such as a[] <- b follows the spray package. If
b is a length-one scalar, then coeffs(a) <- b has the same
effect as a[] <- b.
Functions terms() [see term.Rd]and coeffs() are the
extraction methods. These are unordered vectors but the ordering is
consistent between them (an extended discussion of this phenomenon is
presented in the mvp package).
Function coeffs<-() (idiom coeffs(a) <- b) sets all
coefficients of a to b. This has the same effect as
a[] <- b.