You could also outsheet (.outsheet year male age pop using whatever.txt,
nonames nolabel replace) the data, and then add the first three
clear
set obs 3468
input year male age pop
lines to the top of the ASCII file you got with that command.
Christian
-----Urspr�ngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von
pjspam@nisjepsen.dk
Gesendet: 08 July 2005 12:53
An: statalist@hsphsun2.harvard.edu
Betreff: st: Inputting data from inside .do-file
Dear Statalisters,
I am making an .ado-file to produce a large number of standardized incidence
rates. The program uses data from the standard population stored in
'standardpop.dta' which has 3468 records. Now, I have to keep this standard
population with the .ado-file as an ancillary file, and I thought it would
be easier if the data from 'standardpop.dta' could be entered automatically
from inside my .ado-file.
I could do it like this:
clear
set obs 3468
input year male age pop
1901 0 0 151800
1901 0 5 133900
...etc., but it's hard work!
Could anybody suggest a more efficient way?
Thank you in advance.
Peter.
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/