sws: Scrabble Word Score

Description Usage Arguments Value Note Author(s) See Also Examples

Description

Gives the base word score for a string in scrabble.

Usage

1
sws(w,only.possible=TRUE,check.valid=FALSE)

Arguments

w

Word or vector of words

only.possible

Default=TRUE Only consider scores that are possible based on the distribution of scrabble letters. For example "zzz" would score 30 if it weren't for the fact that there is only 1 'z' necessitating the use of 2 blanks, for a real score of 10.

check.valid

Default=FALSE When TRUE returns a score of 0 for words not in the TWL06 dictionary.

Value

Returns a vector of values for the word score of each word passed in.

Note

The name "Scrabble" is a trademark of Hasbro, Inc. in the United States and Canada; elsewhere, it is a trademark of Mattel.

Author(s)

Will Kurt <wckurt@gmail.com>

See Also

sls

Examples

1
2
3
4
sws("zzz")
sws(c("dog","zzz"))
sws(c("dog","zzz"),only.possible=FALSE)
sws(c("dog","zzzzzz"),only.possible=FALSE,check.valid=TRUE)

ScrabbleScore documentation built on May 2, 2019, 2:01 p.m.