Skip to content

question

2 messages · Angel Valverde Portal, Duncan Murdoch

#
On 05/08/2011 10:46 AM, Angel Valverde Portal wrote:
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