Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: Spliting a variable


From   "Mike Kim" <[email protected]>
To   <[email protected]>
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index