It looks like I should read the documentation a bit more carefully. Simply ignoring the NA values when calculating the mean *is* a much better solution. (Although having 10 values out of a vector of 40000 or so set to zero is *not* going to bias the mean toward zero in any significant way.) Thanks to everyone for your help. Reuben