Skip to content
Prev 207192 / 398503 Next

Na.omit on matrix, does the matrix have to have a limited size

Okay I had a look now at my matrix with clearer head than yesterday and you
are right, some columns have their own missing values that you don't find in
the other columns, I checked it yesterday many times because that was my
guess as well but didn't see anything I don't understand why, sorry! So I
converted this matrix to a time serie now. The thing is that I want to
calculate the moving average at t on a width x (so I would take the values
from t to (t - x + 1) but in the case I have Na's I want it to remain a
moving average of width x excluding the Na value and taking the value at t -
x instead. Any guess on how I could do this? I am using runmean for the
moment