rewrited signal::decimate function so that it could work with vectors, containing NAs