Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Basic infile question

    I have raw data I am trying to use STATA to do research on, and this is a segment of it:

    BRBTY010000000000020 2010 G1 7.5
    BRBTY010000000000020 2010 G2 11.7 P
    BRBTY010000000000020 2010 G3 6.3
    BRBTY010000000000020 2010 G4 8.7 Q

    I am trying to use infile to read it in:

    infile str20 var1 double year str2 var3 raw_percent str1 letter_code using gch.raw

    The variable names are in bold

    Is there a way I can use infile where it knows to skip trying to enter something into letter_code if the raw data goes to a new line, rather than taking the first letter of the next value for var1? I read the doc, it doesn't seem there is a use case for that in infile at least.

    I do appreciate the help, thank you.

  • #2
    This work?

    import delimited "gch.raw", delimiter(space) clear

    Comment

    Working...
    X