Created
January 18, 2016 21:09
-
-
Save dill/4a9377b55558bd0d1917 to your computer and use it in GitHub Desktop.
Scrabble/US states/chemical elements
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# overlap of: | |
# - US state 2 letter codes from state.abb in R | |
# - 2-letter Scrabble words https://en.wiktionary.org/wiki/Appendix:Official_English_Scrabble_2-letter_words | |
# - chemical element symbols https://en.wikipedia.org/wiki/Symbol_%28chemistry%29 | |
# get data | |
states <- tolower(state.abb) | |
scrabble <- c('aa','ab','ad','ae','ag','ah','ai','al','am','an','ar','as','at','aw','ax','ay','ba','be','bi','bo','by','ch','da','de','di','do','ea','ed','ee','ef','eh','el','em','en','er','es','et','ex','fa','fe','fy','gi','go','gu','ha','he','hi','hm','ho','id','if','in','io','is','it','ja','jo','ka','ki','ko','ky','la','li','lo','ma','me','mi','mm','mo','mu','my','na','ne','no','nu','ny','ob','od','oe','of','oh','oi','om','on','oo','op','or','os','ou','ow','ox','oy','pa','pe','pi','po','qi','re','sh','si','so','st','ta','te','ti','to','ug','uh','um','un','up','ur','us','ut','we','wo','xi','xu','ya','ye','yo','yu','za','zo') | |
elements <- tolower(c('Ac','Ag','Al','Am','Ar','As','At','Au','B','Ba','Be','Bh','Bi','Bk','Br','C','Ca','Cd','Ce','Cf','Cl','Cm','Cn','Co','Cr','Cs','Cu','Db','Ds','Dy','Er','Es','Eu','F','Fe','Fl','Fm','Fr','Ga','Gd','Ge','H','He','Hf','Hg','Ho','Hs','I','In','Ir','K','Kr','La','Li','Lr','Lu','Lv','Md','Mg','Mn','Mo','Mt','N','Na','Nb','Nd','Ne','Ni','No','Np','O','Os','P','Pa','Pb','Pd','Pm','Po','Pr','Pt','Pu','Ra','Rb','Re','Rf','Rg','Rh','Rn','Ru','S','Sb','Sc','Se','Sg','Si','Sm','Sn','Sr','Ta','Tb','Tc','Te','Th','Ti','Tl','Tm','U','Uuo','Uup','Uus','Uut','V','W','Xe','Y','Yb','Zn','Zr')) | |
# the intersection | |
intersect(intersect(states, scrabble),elements) | |
# [1] "al" "ar" "in" "la" "mo" "ne" "pa" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment