[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: strings hnadling
Hi List users,
I have data which has been entered awkwardly.
Instead of taking each a seperate variable for each item - all items of a
category are entered together in a variable.
ID Grp1 Grp2 Grp3 Grp4
001 2;3;4 10;99;2 01 11,2,25,2,3
I'd like to convert this to a dataset that looks like
ID Grp1 Grp2 Grp3 Grp4
001 3 3 1 5
i.e. the count of the number of semi-colons within each variable. I am sure
there is a neat way of doing this but I am missing it. So i thought i'd
write in and ask for u r help.
thanks
Alnerdy
_________________________________________________________________
Don�t just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/onm00200636ave/direct/01/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/