ceiling(x) floor(x) trunc(x)
ceiling(x) contains the smallest integers >= x.
floor(x) contains the largest integers <= x.
trunc(x) contains the closest integers to x between x and 0, inclusive, e.g., trunc(1.5) is 1, and trunc(-1.5) is -1. trunc is like floor for positive values and like ceiling for negative values.
ceiling(c(-1.9, -1.1, 1.1, 1.9)) # returns c(-1,-1,2,2) floor(c(-1.9, -1.1, 1.1, 1.9)) # returns c(-2,-2,1,1) trunc(c(-1.9, -1.1, 1.1, 1.9)) # returns c(-1,-1,1,1)