[R] logic operation on an array

Gang Chen gangchen at mail.nih.gov
Tue Aug 28 17:02:04 CEST 2007


I want to check whether all the components of a vector (or an array)  
are 0, and if they are I will skip the later computations. Of course  
I can create a loop to go through all the components. However is  
there an R function for this purpose more efficient than looping?

Thanks a lot,
Gang



More information about the R-help mailing list