R/gzomat.R

Defines functions gzomat

Documented in gzomat

gzomat <- function(m, n, p){
    M <- matrix(0, m, n)
    index <- c(1: (m*n))
    index <- sample(index, round(p*m*n), replace = FALSE)
    M[index] <- 1
    return(M)
}
xzheng-ac/scPADGRN documentation built on July 26, 2020, 12:41 a.m.