replace any(is.na(...)) by anyNA(...); synapter depends on R >= 3.1.0 now