[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: -nsplit- is a new command on SSC
I downloaded your new program and tried it out on some dates that were
formatted as: modayyr; e.g. 12302004. The worked perfectly. Thanks - a very
The maintainer of the SSC archive Kit Baum has made available
my program -nsplit-.
-nsplit- generates new numeric variables based on the supplied
digit pattern of a larger numeric variable. So if you had the
numeric variable MonthYear:
. nsplit MonthYear, digits(2 4) generate(month year)
.list MonthYear month year
MonthYear month year
122004 12 2004
51996 5 1996
32002 3 1994
-nsplit- can also be used to split up complex id variables or whatever
value numeric variable you may have.
I would also like to acknowledge Nick Cox for helping out with the code.
It's not much of a "stocking stuffer" but it is free:
. ssc install nsplit
Applications Analyst Programmer
Carolina Population Center UNC-CH
* For searches and help try: