This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# lets make some dummy data | |
n_rows <- 1000 | |
n_cols <- 100 | |
mat <- matrix(0, nrow=n_rows, ncol=n_cols) | |
mat <- apply(mat, 2, function(x) { return(rbinom(n_rows, size=1, prob=0.1))}) | |
colnames(mat) <- paste0("event", 1:n_cols) | |
rownames(mat) <- paste0("pol", 1:n_rows) | |
# lets take a look at it before we do some math | |
head(mat) |