Posts

Showing posts from August, 2018

Example of comparing SAS scan function to Python split function

SAS Version: data _null_;   name1 = "Richard Thornton";   fname = scan(name1,1);   lname=scan(name1,2);     print fname;     print lname; run; Python 3.x Version: name1 = "Richard Thornton" fname=name1.split(" ")[0] lname=name1.split(" ")[1] print(fname) print(lname) explanation:  The split() function takes the string and turns the individual elements into a new variable which is essentially a list, based on the delimiter passed. To reference, each item in the list, an offset is passed via [0] or [1].  Python is like C, it references from 0, not 1, as SAS does.

Looking for New SAS assignment

As of July 31, 2018 I am looking for a new SAS assignment, will travel up to 80% of time. thornton.richard@gmail.com 201-787-8066 Call or email for an updated resume. Thanks.