Announcement

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

  • Trying to use .txt without a delimiter

    Hi,

    I am trying to use a file that does not have a delimiter. I do have a coding book though, so I know for example that the first 3 characters are the county number, the next 8 are the voter registration number, etc. Is there a way I can break up the one huge strung variable into multiple variables. I want the first three charters to be on one column, the next 8 in another, etc.

    Any suggestions? The file has 4,000,000+ records so trying to do anything on excel isn't really possible.

    Thank you!

  • #2
    Welcome to Statalist.

    The output of help infile2 describes using a "dictionary file" to read a dataset like yours.

    Comment


    • #3
      Thanks that was super helpful! Do you know if there a help command for creating a dictionary?

      Comment


      • #4
        See the manual entry for more detail than the help provides. It is reachable by a clickable link at the head of the help.

        Comment

        Working...
        X