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