Alan Simpson <alan.simpson <at> robertsresearch.com.au> writes:
: Does anybody know of any way to create an index of all the possible : combinations of variables (factors) in a data frame? ie for 3 factors A, B & : C we have : : A : B : C : AB : AC : BC : ABC : : which equates to columns 1, 2, 3, 1:2, (1,3), 2:3 and 1:3. : : I realise that a function like model.matrix does this, but how to get the : seqence of the index? : Is this what you are looking for? R> attributes(terms(~ a * b * c))$term.labels [1] "a" "b" "c" "a:b" "a:c" "b:c" "a:b:c" ______________________________________________ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
