[Rd] terms function bug?

2014-10-29 Thread Patrick O'Reilly
Hi, I've noticed something strange when using the terms {stats} function. R documentation describes the factors attribute of the terms.object as follows: A matrix of variables by terms showing which variables appear in which terms. The entries are 0 if the variable does not occur in the term, 1

[Rd] model.matrix metadata

2014-10-17 Thread Patrick O'Reilly
Hi, As far as I am aware, the model.matrix function does not return perfect metadata on what each column of the model matrix "means". The columns are named (e.g. age:genderM), but encoding the metadata as strings can result in ambiguity. For example, the dummy variables created when the factors v