Find words which contains all the vowels: Difference between revisions

Added R.
(Corrected file closure statement)
(Added R.)
Line 751:
sulfonamide
</pre>
 
=={{header|R}}==
Adapting this from https://rosettacode.org/wiki/Find_words_which_contain_the_most_consonants#R is trivial.
<lang R>dict <- scan("https://web.archive.org/web/20180611003215/http://www.puzzlers.org/pub/wordlists/unixdict.txt", what = character())
dictBig <- dict[nchar(dict) > 10]
vowels <- letters[letters %in% c("a", "e", "i", "o", "u")]
#The following line is equivalent to sapply(vowels, function(x) stringr::str_count(dictBig, x))
#As with all things with strings in R, life is easier with stringr or stringi.
vowelCount <- sapply(vowels, function(x) lengths(regmatches(dictBig, gregexec(x, dictBig))))
dictBig[apply(vowelCount, MARGIN = 1, function(x) all(x == 1))]</lang>
 
=={{header|Raku}}==
331

edits