testlist <- list(im = c(1.27890654606226e-188, 7527485546020.59, -2.14488209182332e+105, Inf, -2.02048162434253e-44, NaN, 3.42032101584627e-93, 8.27932373953685e-269, -4.36408839884835e-38, Inf, 0), sx = 2069757405L, sy = -1364041863L, sz = 1062769791L) result <- do.call(imager::dilate_rect,testlist) str(result)