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

jim holtman jholtman at gmail.com
Tue Dec 1 18:33:07 CET 2009


?try

On Tue, Dec 1, 2009 at 12:22 PM, Jannis <bt_jannis at yahoo.de> wrote:
> Dears,
>
>
> 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).
>
>
> Cheers
> Jannis
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem that you are trying to solve?




More information about the R-help mailing list