В своих функциях вы производите вычисления, а затем делаете тест независимым. Я сначала проверил бы условия и обновил бы x, а затем произвел бы вычисления как:
smart.pois <- function(x, lambda, xmax=Inf) {
x <- pmin(x, xmax) #3. If x is too large - you have to define what is too large
x <- trunc(x) #2. If x is non-integer
idx <- x < 0 #1. If x is negative
x[idx] <- 0 #Overwrite negative x to avoid warnings
ifelse(idx, NA, round((exp(-lambda))* (1/factorial(x))*exp(x*log (lambda)),3))
}
smart.pois(c(-1, 1, 1.2, 1.9, 999), 1, 100)
#NA 0.368 0.368 0.368 0.000