Usage
resta(x = NULL, y = NULL, warn.negative = FALSE)
Arguments
- x
Numeric vector
- y
Numeric vector. Values to subtract from x
- warn.negative
Logical Warn if result is negative
Value
A number or numeric vector of the same length as x
Examples
resta(2, 3)
#> [1] -1
resta(c(2, 2), c(3, 3))
#> [1] -1 -1
if (FALSE) {
resta(c(2, 2), c(3, 3), warn.negative = TRUE) # gives warning
}