powered by
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
sum
mean
a (named) integer vector of Scrabble letter values, computed using FUN, corresponding to the input text(s)
FUN
# NOT RUN { nscrabble(c("muzjiks", "excellency")) nscrabble(texts(data_corpus_inaugural)[1:5], mean) # }
Run the code above in your browser using DataLab