pigs: Pass the Pigs

Description Usage Format Details Source Examples

Description

This data set contains information collected from rolling the pair of pigs (found in the game "Pass the Pigs") 6000 times.

Usage

1

Format

A data frame with 6000 observations on the following 6 variables.

roll

roll number (1-6000)

black

numerical code for position of black pig

blackF

position of black pig coded as a factor

pink

numerical code for position of pink pig

pinkF

position of pink pig coded as a factor

score

score of the roll

height

height from which pigs were rolled (5 or 8 inches)

start

starting position of the pigs (0 = both pigs backwards, 1 = one bacwards one forwards, 2 = both forwards)

Details

In "Pass the Pigs", players roll two pig-shaped rubber dice and earn or lose points depending on the configuration of the rolled pigs. Players compete individually to earn 100 points. On each turn, a player rolls he or she decides to stop or until "pigging out" or

The pig configurations and their associated scores are

1 = Dot Up (0)

2 = Dot Down (0)

3 = Trotter (5)

4 = Razorback (5)

5 = Snouter (10)

6 = Leaning Jowler (15)

7 = Pigs are touching one another (-1; lose all points)

One pig Dot Up and one Dot Down ends the turn (a "pig out") and results in 0 points for the turn. If the pigs touch, the turn is ended and all points for the game must be forfeited. Two pigs in the Dot Up or Dot Down configuration score 1 point. Otherwise, The scores of the two pigs in different configurations are added together. The score is doubled if both both pigs have the same configuration, so, for example, two Snouters are worth 40 rather than 20.

The vector pigConfig is provided to assist in converting from the numeric codes above to pig configurations.

Source

John C. Kern II, Duquesne University (kern@mathcs.duq.edu)

Examples

1
2
data(pigs)
table(pigConfig[pigs$black])

Example output

Loading required package: mosaic
Loading required package: dplyr

Attaching package: 'dplyr'

The following objects are masked from 'package:stats':

    filter, lag

The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union

Loading required package: lattice
Loading required package: ggformula
Loading required package: ggplot2

New to ggformula?  Try the tutorials: 
	learnr::run_tutorial("introduction", package = "ggformula")
	learnr::run_tutorial("refining", package = "ggformula")
Loading required package: mosaicData
Loading required package: Matrix

The 'mosaic' package masks several functions from core packages in order to add 
additional features.  The original behavior of these functions should not be affected by this.

Note: If you use the Matrix package, be sure to load it BEFORE loading mosaic.

Attaching package: 'mosaic'

The following object is masked from 'package:Matrix':

    mean

The following objects are masked from 'package:dplyr':

    count, do, tally

The following objects are masked from 'package:stats':

    IQR, binom.test, cor, cor.test, cov, fivenum, median, prop.test,
    quantile, sd, t.test, var

The following objects are masked from 'package:base':

    max, mean, min, prod, range, sample, sum

Loading required package: mosaicCalc
Loading required package: mosaicCore

Attaching package: 'mosaicCalc'

The following object is masked from 'package:stats':

    D


Attaching package: 'fastR'

The following object is masked from 'package:graphics':

    panel.smooth


      Dot Down         Dot Up Leaning Jowler      Razorback        Snouter 
          2063           1796             29           1354            184 
      Touching        Trotter 
            23            551 

fastR documentation built on May 2, 2019, 5:53 p.m.