R/product_mat.R

product_mat <- function(x, y) {
  out <- x*y
  for (i in 1:dim(x)[1]) {
    out[i, (x[i, ] == 0 | y[i, ] == 0)] <- 0
  }
  return (out)
}

Try the EL2Surv package in your browser

Any scripts or data that you put into this service are public.

EL2Surv documentation built on May 1, 2019, 11:01 p.m.