[R] factor matrix

Adrian Baddeley adrian at maths.uwa.edu.au
Fri Dec 3 07:43:54 CET 2004


> matrix(as.numeric(factor(c(T,F,F,T))), 2,2)

No, this produces a matrix with numeric values,
not categorical values.




More information about the R-help mailing list