Find words which contains more than 3 e vowels: Difference between revisions
Content added Content deleted
Not a robot (talk | contribs) (Add COBOL) |
ReeceGoding (talk | contribs) m (→{{header|R}}: Syntax highlighting.) |
||
Line 1,241: | Line 1,241: | ||
=={{header|R}}== |
=={{header|R}}== |
||
Adapting this from https://rosettacode.org/wiki/Find_words_which_contains_all_the_vowels#R is trivial. |
Adapting this from https://rosettacode.org/wiki/Find_words_which_contains_all_the_vowels#R is trivial. |
||
<lang |
<lang rsplus>dict <- scan("https://web.archive.org/web/20180611003215/http://www.puzzlers.org/pub/wordlists/unixdict.txt", what = character()) |
||
#The following line is equivalent to sapply(c("a", "i", "o", "u"), function(x) stringr::str_count(dict, x)) |
#The following line is equivalent to sapply(c("a", "i", "o", "u"), function(x) stringr::str_count(dict, x)) |
||
#As with all things with strings in R, life is easier with stringr or stringi. |
#As with all things with strings in R, life is easier with stringr or stringi. |