Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

scrabble

Distribution of Scrabble pieces


Description

Distribution and point values of letters in Scrabble.

Usage

data(scrabble)

Format

A data frame with 27 observations on the following 3 variables.

piece

Which piece

points

point value

frequency

Number of pieces

Details

Scrabble is a popular board game based on forming words from the players' pieces. These consist of letters drawn from a pile at random. The game has a certain frequency of letters given by this data. These match fairly well with the letter distribution of the English language.

Examples

data(scrabble)
## perform chi-squared analysis on long string. Is it in English?
quote = " R is a language and environment for statistical computing  \
and graphics. It is a GNU project which is similar to the S language \
and environment which was developed at Bell Laboratories (formerly   \
AT&T, now Lucent Technologies) by John Chambers and colleagues. R    \
can be considered as a different implementation of S. There are      \
some important differences, but much code written for S runs         \
unaltered under R."
quote.lc = tolower(quote)
quote = unlist(strsplit(quote.lc,""))
ltr.dist = sapply(c(letters," "),function(x) sum(quote == x))
chisq.test(ltr.dist,,scrabble$freq)

UsingR

Data Sets, Etc. for the Text "Using R for Introductory Statistics", Second Edition

v2.0-6
GPL (>= 2)
Authors
John Verzani <verzani@math.csi.cuny.edu>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.