# NOT RUN {
x <- matrix(c(2.22, 4.5, 5.5))
# Round up
rray_ceiling(x)
# Round down
rray_floor(x)
# Truncate towards 0
rray_trunc(x)
rray_trunc(-x)
# Round to the specified number of decimal
# places. Border values (on a `5`) are rounded
# towards even numbers
rray_round(x)
rray_round(-x)
rray_round(x, digits = 1)
# Two significant digits
rray_signif(x, 2)
# }
Run the code above in your browser using DataLab