m <- cbind(a=1:5, b=3:7, c=-2:2)
pmax (3, m) # < dropping all attributes
pmax.sa(3, m) # matrix with dimnames
## no "added value" for simple case:
x <- rpois(20, 7)
stopifnot(identical(pmin (2.1, x),
pmin.sa(2.1, x)),
identical(pmax (2.1, 3),
pmax.sa(2.1, 3)))
Run the code above in your browser using DataLab