Announcement

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

  • Missing Numeric Value with Comma When Importing txt. file

    Dear all,

    I am writing to ask for a problem I met when I tried to import txt. file to Stata. There is a numeric variable called Observation in the file with value of 700,000. I imported the entire file with two variables and two columns using:

    import delimited "C:\Users\A\B\filename.txt", varnames(2) numericcols(2)

    However, the Observation value was converted to empty cell. I could not find an appropriate command to correct this problem.

    Thank you very much in advance!

    Best regards,
    Scarlett Ling




  • #2
    Import as string and then apply the destring command in Stata. with the option ignore(",")

    Comment


    • #3
      Thank you, Nick! That works!

      Comment

      Working...
      X