Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Infix problem


From   "Christian Bustamante" <[email protected]>
To   [email protected]
Subject   Re: st: Infix problem
Date   Mon, 24 Mar 2008 18:52:34 -0500

It works!!!
Thaks Friederich, your post be very helpful

On Mon, Mar 24, 2008 at 5:16 PM, Friedrich Huebler <[email protected]> wrote:
> Christian,
>
>  -infix- the data as strings, -drop- unwanted observations, and then
>  -destring- the data.
>
>  . infix module 1-2 var2 3-4 str var3 5-10 str var4 11-11 str var5
>
> 12-13 var6 14-14 city 16-19 using db1.pet
>  . drop if module == 67
>  . destring var3 var4 var5, replace
>
>  Friedrich
>
>
>
>  On Mon, Mar 24, 2008 at 3:45 PM, Christian Bustamante <[email protected]> wrote:
>  > Hi everyone....
>  >  I'm trying to read a plain text database with Stata 10, but there is a problem.
>  >  The command i've using is this:
>  >
>  >  infix module 1-2 var2 3-4 var3 5-10 var4 11-11 var5 12-13 var6 14-14
>  >  city 16-19 using db1.pet if module==95
>  >  infix module 1-2 var2 3-4 var3 5-10 var4 11-11 var5 12-13 var6 14-14
>  >  city 16-19 using db1.pet if module==10
>  >
>  >  This is a example of the data base
>  >  670104enginer     0515
>  >  9510006455 12    0515
>  >  1062044112 305  0515
>  >
>  >  I want to read that variables only for modules 95 and 10, not 67, but
>  >  the proble is the text in the lines of module 67. So, stata says:
>  >  'engi' cannot be read as a number for var3[1]
>  >
>  >  How can i solve this??
>  >  Pd. I don't matter the module 67
>  *
>  *   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/
>



-- 
CdeB
*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index