Skip to content
Prev 44811 / 398506 Next

Accessing columns in data.frame using formula

Paul Lemmens wrote:
I guess you are really looking for model.frame() and friends, but not
for the stuff written down below.  I may be wrong ... so here we go:
Why not   data[[resp]]
data[[facts[2]]] <- factor(data[[facts[2]]])
data.tmp <- data[[resp]][data[[facts[1]]] == 'i']


Uwe Ligges