terms(x, ...) ## S3 method for class 'formula': terms(x, specials = NULL, abb = NULL, data = NULL, neg.out = TRUE, keep.order = FALSE, simplify = FALSE, ..., allowDotAsName = FALSE) ## Default S3 method: terms(x, ...) ## S3 method for class 'terms': terms(x, ...) ## S3 method for class 'lm': terms(x, ...) ## S3 method for class 'aovlist': terms(x, ...)
x | a formula or an object that contains a terms object. |
specials | a character string that specifies which functions in the formula to mark as special in the terms object. |
abb | argument is ignored. |
data | data frame in which to interpret the formula. This is an optional argument that you can specify if you want to use the special name "." in the formula to refer to all the variables (except a possible response variable) in the data frame. |
neg.out | argument is ignored. |
keep.order | a logical value. If TRUE, the function preserves the order of the terms to be the same order in which the terms were generated or as they were originally found in the input. If FALSE (the default), terms are sorted so that main effects appear before interactions, and so on. |
simplify | a logical value. If FALSE (the default), the output formula is the same as the input formula. If TRUE, the output formula is the same as the input formula except that it is expanded to the equivalent sum of colon-separated variables whose order is controlled by the keep.order argument. In this case, the expressions in the formula that include the operators: *, ^, /, and %in% are expanded and any redundant or cancelling terms are eliminated. |
allowDotAsName | a logical value. If FALSE (the default) a "." on the right side (predictor) of the formula is treated as all the names of the variables in the data argument except those found on the left side (response) of the formula. If TRUE "." has no special meaning and refers to a variable named ".". |
... | additional arguments passed to or from other methods. Current methods for terms do not use any of these additional arguments. |
terms(Yield ~ Temp * Conc + Error(blocks), specials="Error") terms(Yield ~ offset(0.5*Temp) * offset(0.01*Conc) + Error(blocks), specials="Error")Data <- data.frame(X1=sqrt(1:10), X2=log(1:10), X3=sin(1:10), X4=cos(1:10)) terms(aov(X1~X2+offset(0.1*X3)*X4, Data))