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]
Re: st: Data editor
From
Nick Cox <[email protected]>
To
[email protected]
Subject
Re: st: Data editor
Date
Mon, 21 Jan 2013 17:26:25 +0000
-charlist- from SSC is a tool for finding unusual characters in string
variables. See also the help for -split- for how to exploit what you
find.
Nick
On Mon, Jan 21, 2013 at 5:03 PM, Marie Bérégovoy
<[email protected]> wrote:
> I'm having problem with splitting a variable.
> I am using stata 11 for mac.
>
> The substantive problem is this : I have excel sheet with 13 000 events. In a column I have a variable representing the name of companies involved in this event. My problem is that there are multiples companies involved in ONE event.
>
> I want to split the variable to have an event for each company. Saying that for example event 1 involves company A, company B and Company C (all in the same cell) i want to have : first row and first column : event 1 ; first row and second column : company A ; second row and first column : event 1 ; second row and second column : company B ; etc.
>
> My data looks like this
> event_date VC_Name
> ---------------------------------------
> 2013/02/05 Company A
> Company B
> Company C
> 2013/02/06 Company D
> Company E
> Company F
> 2013/02/09 Company G
> Company H
> Company I
>
> I need date looks like
> event_date VC_Name
> ---------------------------------------
> 2013/02/05 Company A
> 2013/02/05 Company B
> 2013/02/05 Company C
> 2013/02/06 Company D
> 2013/02/06 Company E
> 2013/02/06 Company F
> 2013/02/09 Company G
> 2013/02/09 Company H
> 2013/02/09 Company I
>
> Is there a way to split the cell as I described above ? I think there might be a "automatically wrapped" function in the company cell (the character is OA in SAS). I have a lot of datas so it would be really useful.
>
> Thanks for your time.
>
> Marie Beregovoy
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/