Tally the Scrabble letter values of text given a user-supplied function, such as the sum (default) or mean of the character values.
nscrabble(x, FUN = sum)
a character vector
function to be applied to the character values in the text;
default is sum
, but could also be mean
or a user-supplied
function
a (named) integer vector of Scrabble letter values, computed using
FUN
, corresponding to the input text(s)
# NOT RUN {
nscrabble(c("muzjiks", "excellency"))
nscrabble(data_corpus_inaugural[1:5], mean)
# }
Run the code above in your browser using DataLab