[R] abs(U) > 0 where U is a vector?

Benjamin Dickgiesser dickgiesser at gmail.com
Wed Mar 14 11:52:59 CET 2007


Thx for all your responses!

while(all(abs(U) > 0))
{
..
}

was what I am looking for.

On 3/14/07, Benjamin Dickgiesser <dickgiesser at gmail.com> wrote:
> Hi,
>
> I am looking for a way to compare if every element of a vector is > 0.
>
> i.e.
> while(abs(U) > 0)
> {
>
> ..
> }
>
> is there a function for this or do I have to write one?
>
> I'd appreciate your help!
>
> Benjamin
>



More information about the R-help mailing list