1

I am using the rts package in R and specifically the mean function, over a a gridded climatic dataset with many NA values. When I use apply.yearly(my_rts_object,mean) all I get is an empty raster time series.

Does anyone knows if a large number of NAs can introduce such a problem to the rts mean function? I did not find any infos regarding NAs in rts documentation and I would really like to know if anyone has faced a similar issue (other functions like min and max work fine and return values).

  • 1
    I think you look for something equivalent to na.rm=T for the rts package but probably someone else will be able to advise you where to look in order to solve this. – geo_dd Apr 11 at 9:28
  • That is what I thought but it doesn't work. Weird thing though, when I tested the mean function over the same datasest (e.g. mean(my_stack,na.rm=T) it works. – foo Apr 11 at 9:35
  • Oh, thank you for your time and effort @samcarter. I will try this. – foo Apr 18 at 17:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.