Nothing
#' Parallel sum
#'
#' This functin is to \link{sum}, what \link{pmin} and \link{pmax} is to \link{min} and \link{max}.
#'
#' @param ... numeric vectors
#' @param na.rm a logical indicating whether missing values should be removed.
#' @export
#' @examples
#' psum(1:10, 1:10, 1:10)
psum <- function(..., na.rm = FALSE) {
dat <- do.call(cbind, list(...))
res <- rowSums(dat, na.rm = na.rm)
idx_na <- !rowSums(!is.na(dat))
res[idx_na] <- NA
res
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.