Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Spliting a variable


From   "Mike Kim" <kalisperos@gmail.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Spliting a variable
Date   Wed, 7 Dec 2011 16:59:41 -0600

Hi all,

I have a question about splitting a variable. My data look like this:

author
                                                                            
       school
Aguin, H; Ju, H; Gottfred, RK                                        [Aguin,
H; Ju, H; Gottfred, RK] Indiana Univ
Bell,
T                                                                           
        Drexel Univ
Buck, MR; Novice, MM; Robert, F; Hump, JH         [Buck, MR] Univ Oklahoma;
[Novice, MM; Robert, F] Univ Mississippi; [Hump, JH] Texas A&M Univ
Kohli, C; Juri, R                                          
                      [Kohli, C] Calif Univ; [Juri, R] Kansas Univ
......

I would like to change into the following form. I tried the following, but
it is not easy to change into this form. Can anyone please help?
split school, p(";" "]")

author
                                                                            
       school 
Aguin,
H                                                                           
     Indiana Univ
Ju,
H                                                                           
           Indiana Univ
Gottfred,
RK                                                                        
Indiana Univ
Bell,
T                                                                           
          Drexel Univ
Buck,
MR                                                                          
    Univ Oklahoma
Novice,
MM                                                                         
Univ Mississippi       
Robert,
F                                                                           
    Univ Mississippi;
Hump,
JH                                                                          
   Texas A&M Univ
Kohli,
C                                                                           
       Calif Univ
Juri,
R                                                                           
         Kansas Univ

Thanks in advance.
Mike.


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index