Skip to content

conditional assignment

1 message · Liaw, Andy

#
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Don't think so.  zz <- z has the value z; i.e., c(1, 2, 3).  When evaluated
as logicals, non-zero values are treated as true (as in C), I believe.  For
example:
[1] 0 0 0
[1] FALSE FALSE FALSE

However, what tripped me is the fact that even though non-zero is logically
`true', it's not necessarily equal to TRUE (which is numerically equal to
1):
[1] FALSE  TRUE FALSE
[1] 0 1 1
[1] TRUE

Andy
------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments,...{{dropped}}