I have a vector a containing the following values:
3.00 6.00 NaN -7.00 56.00 32.00 ... Inf 7.00 15.00 NaN Inf 4.00
How is it possible to sum only numerical values (without NaNs, Inf and so on) within such a vector?
I've tried sum(a,na.rm=TRUE), but it didn't help me.