Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Query re -sortpreserve-


From   Roger Newson <roger.newson@kcl.ac.uk>
To   statalist@hsphsun2.harvard.edu
Subject   st: Query re -sortpreserve-
Date   Fri, 20 Jun 2003 16:48:08 +0100

Hello All

I am trying to use -sortpreserve- in Stata 7 and Stata 8 under Windows 98/SE. However, there is one problem. My -sortpreserve- programs do not seem to be generating a -`sortindex'- temporary variable, as -[P] sortpreserve- says they should. (A simple example under Stata 8 is given below.) Why should this be the case?

Best wishes (and thanks in advance)

Roger

. prog def nutz1,sortpreserve
1. version 8.0
2. disp as text "Sort index var: |`sortindex'|"
3. sort `sortindex'
4. end

. nutz1
Sort index var: ||
varlist required
r(100);


--
Roger Newson
Lecturer in Medical Statistics
Department of Public Health Sciences
King's College London
5th Floor, Capital House
42 Weston Street
London SE1 3QD
United Kingdom

Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
or 020 7848 6605 International +44 20 7848 6605
Email: roger.newson@kcl.ac.uk
Website: http://www.kcl-phs.org.uk/rogernewson

Opinions expressed are those of the author, not the institution.

*
* 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/




© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index