An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110805/8d82a357/attachment.pl>
question
2 messages · Angel Valverde Portal, Duncan Murdoch
On 05/08/2011 10:46 AM, Angel Valverde Portal wrote:
Hi everybody, How can I transform a 0/1 matrix into a TRUE/FALSE matrix, and vice versa?
If A is your matrix, and you really want 0 to be TRUE (a little weird...), just use A == 0 and you get a logical matrix. To go the other way, as.numeric will convert TRUE to 1 and FALSE to 0; if you don't want that, pre- or post-process. Duncan Murdoch