Suppose I have two vectors of same dimensions:
x <-c(0.49534,0.80796,0.93970,0.99998)
count <-c(0,33,0,4)
How can I group the vectors 'x' into two vectors:
- Vector
grzero
that contain value in x withcount
value greater than 0 and - Vector
eqzero
with value in x withcount
value equal to zero.
Yielding
> print(grzero)
> [1] 0.80796 0.99998
> print(eqzero)
> [1] 0.49534 0.93970