I'm not sure, but is this what you want
matrix(as.numeric(factor(c(T,F,F,T))), 2,2)
Tom Mulholland
-Original Message-
From: Adrian Baddeley [mailto:[EMAIL PROTECTED]
Sent: Friday, 3 December 2004 1:45 PM
To: [EMAIL PROTECTED]
Subject: [R] factor matrix
Sorry if this is a FAQ.
matrix(as.numeric(factor(c(T,F,F,T))), 2,2)
No, this produces a matrix with numeric values,
not categorical values.
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
] TRUE FALSE FALSE TRUE
Levels: FALSE TRUE
-Original Message-
From: Adrian Baddeley [mailto:[EMAIL PROTECTED]
Sent: Friday, 3 December 2004 2:44 PM
To: Mulholland, Tom
Cc: [EMAIL PROTECTED]
Subject: RE: [R] factor matrix
matrix(as.numeric(factor(c(T,F,F,T))), 2,2
__
[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