Announcement

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

  • Destring - all numeric digits, not scientific expression

    Hello everyone,
    I have the following Stata code:
    Code:
    input str16 x1
    123456789
    end
    destring x1, gen(x2)
    sum x2
    The output is
    HTML Code:
       Variable |        Obs        Mean    Std. Dev.       Min        Max
    -------------+---------------------------------------------------------
              x2 |          1    1.23e+08           .   1.23e+08   1.23e+08
    How can I tweak this code, so I can get the full 9-digit number, and not its scientific expression?

    Thank you for your time

  • #2
    Code:
    . format x2 %9.0f
    
    . sum x2, format

    Comment


    • #3
      Thank you so much, Nick!

      Comment

      Working...
      X