limits the values of a vector or array to a desired interval, while keeping the shape of the vector/array
lim(x, min = 0, max = 1, clip = NULL, na = NULL)vector or array
minimum value
maximum value
optional value specifying the value assigned to clipped data, e.g. clip=NA
optional value specifying the value assigned to non-numbers (NA and NaN)
vector/array of the same shape as x