playing_cards: Table of Playing Cards in 52-Card Deck

Description Usage Format Source Examples

Description

A table describing each of the 52 cards in a deck.

Usage

1

Format

A data frame with 52 observations on the following 2 variables.

number

The number or card type.

suit

Card suit, which takes one of four values: Club, Diamond, Heart, or Spade.

face_card

Whether the card counts as a face card.

Source

This extremely complex data set was generated from scratch.

Examples

1
2
3
4
5
playing_cards <- data.frame(
    number = rep(c(2:10, "J", "Q", "K", "A"), 4),
    suit = rep(c("Spade", "Diamond", "Club", "Heart"), rep(13, 4)))
playing_cards$face_card <-
    ifelse(playing_cards$number %in% c(2:10, "A"), "no", "yes")

OpenIntroStat/openintro-r-package documentation built on Jan. 22, 2020, 3:23 p.m.