pfun | R Documentation |
Perform binary operations on vectors, matrices, or data frames.
pfun(..., na.rm = FALSE, FUN = `+`)
psum(..., na.rm = FALSE)
... |
numeric vectors, matrices, or data frames with equal dimensions |
na.rm |
logical; if |
FUN |
a binary function |
An object similar to input objects after successively combining elements
with FUN
.
pmin
; pmax
x <- c(-1, NA, 4, 15)
y <- c(NA, NA, 6, -1)
x + y
psum(x, y)
psum(x, y, na.rm = TRUE)
x <- matrix(x, 4, 4)
y <- matrix(y, 4, 4)
x + y
psum(x, y)
psum(x, y, na.rm = TRUE)
x - y - x
pfun(x, y, x, FUN = `-`)
pfun(x, y, x, FUN = `-`, na.rm = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.