scrabble(UsingR)
scrabble()所属R语言包:UsingR
Distribution of Scrabble pieces
分布的拼字游戏作品
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Distribution and point values of letters in Scrabble.
分布和点值的字母拼字游戏。
用法----------Usage----------
data(scrabble)
格式----------Format----------
A data frame with 27 observations on the following 3 variables.
27以下3个变量的观察与数据框。
piece Which piece
件件
points point value
分点值
frequency Number of pieces
件的频率数
Details
详细信息----------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.
Scrabble是一个流行的棋盘游戏的基础上形成的话,球员们的作品。这些包括从一堆随机的字母。游戏中有一定的频率,该数据由字母。这些比赛相当不错的英文字母分布。
实例----------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)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|