library(usethis)
library(Games)
deck52 <- list(
text = factor(
paste(
rep(c("A", 2:10, "J", "Q", "K"), # De Ace à Roi
each = 4), # les répéter 4 fois chacun pour Pique, coeur, carreau et trèfle
c(spade("text"), # pique
heart("text"), # coeur
diamond("text"), # carreau
club("text")) # trèfle
),
levels = paste(
c("A", 2:10, "J", "Q", "K"),
rep(c(spade("text"), heart("text"), diamond("text"), club("text")), each = 13)
)
)
)
deck52 <- lapply(deck52, sort)
use_data(deck52, overwrite = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.