[R] Error message when logical indexing vecor is all FALSE

Jannis bt_jannis at yahoo.de
Tue Dec 1 18:22:44 CET 2009


is there any way to "switch off" or work around the error message that
pops up when I do something like:

A<-B['logical vector']

and when 'logical vector' only consists of FALSE values? My problem is
that this message always kicks me out of my loops and always testing via
an if clause whether 'logical vector' contains any TRUE values is much
too complex due to many different conditions and several of the above
statements (and actually it seems to make my code really slow).


More information about the R-help mailing list