Email firstname.lastname@example.org to sign up to receive news and updates
Keys and Searching Strings
This is a slightly modified web version of a presentation I gave at work in 2011 on using the keys functionality in SAS, as well as several different ways to search variables that are strings (ie. characters). I include all slides below, some notes for some slides, as well as a link to the .pdf file of the slides here.
This can submit all code, or highlight code and submit highlighted code.
Distance methods are ways of measuring how bad your mistake is. If you have Justin, and type in Dustin or Justine, it is not that bad. But if you have Justin and type in Mary, that is much worse.
This is good for anticipating possible typos and variations.
The general algorithm for this is from ~1920! Basically, you retain the leading consonant, drop vowels, assign numbers to remaining consonants in a certain way. One can also use the operator =* for the sounds-like operator. For example, Jobtosearch=*jobfromlist.
- Double a letter, cost 50
- Add a letter to the end, cost 35
- Insert a letter at the beginning, cost 200
Compged is more generalized than complev, not symmetric, and the order matters (SAS 9). Also using the COMPCOST function, you can set your own cost for operations.
I hope you found the presentation informative.
Please anonymously VOTE on the content you have just read:Like:
If you enjoyed any of my content, please consider supporting it in a variety of ways:
- PLEASE take a moment to check out two GoFundMe fundraisers I set up. The idea is to make it possible for me to pursue my passions. My goal is to be able to create free randomized educational worksheets and create poetry on a full-time basis. THANK YOU for your support!
- Email email@example.com to sign up to receive news and updates
- Donate any amount via PayPal
- Take my Five Poem Challenge
- Subscribe to my YouTube channel
- Visit my Amazon author page
- Buy what you need on Amazon using my affiliate link
- Follow me on Twitter here
- Buy ad space on Statisticool.com
AFFILIATE LINK DISCLOSURE: Some links included on this page may be affiliate links. If you purchase a product or service with the affiliate link provided I may receive a small commission (at no additional charge to you). Thank you for the support!