Description Usage Arguments Value Examples
View source: R/words_to_numbers.R
words_to_numbers takes a character string and replaces numbers written in words with numerics.
1 | words_to_numbers(string)
|
string |
a character string |
Returns a string with any detected numbers written as words replaced by numbers
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | library(wordstonumbers)
words_to_numbers("ninety-nine red balloons")
words_to_numbers("twelve")
words_to_numbers("Forty-three thousand")
words_to_numbers("There were one thousand, two hundred and thirty. Twelve.")
example <-
"The PRQ is a twelve-item, four-point Likert scale
(from one = Never to four = Very Often) with three sub-scores
bullying (PRQ-Bully), being victimized (PRQgroup-Victim),
and pro-social behavior (PRQ-Prosocial). A translated,
backtranslated final Arabic version of the scale was found
to be accurate showing good internal consistency in this
sample [PRQ-Victim (alpha = .seventy four)
and PRQ-Bullies (alpha = seventy-four)]."
words_to_numbers(example)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.