Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: writing out numbers ("two" instead of "2")


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: RE: writing out numbers ("two" instead of "2")
Date   Fri, 9 Jan 2009 17:04:17 +0100

Line for the server...

As a crude solution, try the approach demonstrated in NJC`s http://www.stata-journal.com/sjpdf.html?articlenum=pr0013

**********
clear*
input mynumbers
1
6
3
4
9
end
clonevar mynewnumbers=mynumbers

loc numbers "One Two Three Four Five Six Seven Eight Nine"
token `numbers'

forv i = 1/9 {
	 la def number  `i' "``i''" , modify
}
 
la val mynewnumbers number

l, noo
**********

HTH
Martin


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Jan Sauermann
Sent: Friday, January 09, 2009 3:43 PM
To: [email protected]
Subject: st: writing out numbers ("two" instead of "2")

Dear Statalist,

I use Stata to store certain numbers in text-files in order to include
these in the text of my Latex-file (which is pretty handy, by the
way).

Some numbers (integers only) are pretty small, say 2. Is there a way
to convert a number "2" into a string with content "two" in Stata?

Kind regards,

Jan


Jan Sauermann
+31.43.38.83801 (office) +31.6.55853921 (gsm) jan.sauermann (skype)
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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