bingo <-c(16,11,24,26,15,18)

my <- NULL

check <- NULL

i <- 1

for (i in 1:200) {

tmp1 <- sample(x =1:49, size = 6, replace = F)

tmp2 <- sum(tmp1 %in% bingo)

check <- c(check,tmp2)

tmp3 <- paste0(tmp1, collapse = ",")

res <- paste0("(", tmp3, ")")

my <- c(my, res)

}

my_check

After writing the code I mentioned above,I want to sort the check in 200 groups into four groups

then if three number in each group are the same with (16,11,24,26,15,18),I get1000$

if four number ,I get 10000$

if five number ,I get 100000$

if six number,I get 1000000$

so, Can I use table() to calculate, and how to use?