Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: How do we access instream data (other than -input- and -display _request-)?
From
"Roger B. Newson" <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: How do we access instream data (other than -input- and -display _request-)?
Date
Fri, 03 Jan 2014 17:14:44 +0000
Fellow Statalisters (especially StataCorp):
During the Wishes and Grumbles session of the 2013 UK Stata User
Meeting, I recall asking if there was a way, in Stata, of reading
instream data, in the way that the -input- command does. That is to say,
I wanted to write ado-files so that they could read in the next few
lines of input, either from the Command window (if the ado-file was
invoked interactively from the Command window), or from the next few
lines of the do-file (if the ado-file was invokedfrom a do-file). Of
course, you can do something similar to this by including an -input-
command in your ado-file, but then the string values you input must
either be words or be quoted. I would prefer to be able to input lines
of text from a do-file, and worry about words and/or quotes afterwards.
And the -display _request- facility, as I understand, does not do this,
either, but just sends input requests to the console. I was advised that
there was a way to do what I wanted to do, but that it was not
officially publicized.
I have looked under -help undocumented- in my Stata/MP Version 13, but
have not found anything that looks like such a capability. Maybe I was
not looking hard enough. And maybe this capability is so unpublicized
that it is not even mentioned in -help undocumented-. But does such a
capability exist?
Best wishes (and thanks in advance)
Roger
--
Roger B Newson BSc MSc DPhil
Lecturer in Medical Statistics
Respiratory Epidemiology, Occupational Medicine
and Public Health Group
National Heart and Lung Institute
Imperial College London
Royal Brompton Campus
Room 33, Emmanuel Kaye Building
1B Manresa Road
London SW3 6LR
UNITED KINGDOM
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Email: [email protected]
Web page: http://www.imperial.ac.uk/nhli/r.newson/
Departmental Web page:
http://www1.imperial.ac.uk/medicine/about/divisions/nhli/respiration/popgenetics/reph/
Opinions expressed are those of the author, not of the institution.
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/