[R] capture numeric(0) with if statement

Alexander.Herr at csiro.au Alexander.Herr at csiro.au
Tue Jul 24 03:42:04 CEST 2007


Hi List,

I am trying to capture the numeric(0) with an if statement,
unsucessfully:

test<-numeric(0)

if(test == numeric(0)) print("test is", test)

I get: Error in if (test == numeric(0)) print("test is", test) : 
        argument is of length zero

How can I capture the numeric(0) condition?

Any enlightment appreciated
Cheers
Herry



More information about the R-help mailing list