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]
Re: st: sortpreserve option
From
Richard Williams <[email protected]>
To
[email protected], [email protected]
Subject
Re: st: sortpreserve option
Date
Thu, 15 Aug 2013 13:00:29 -0500
If you want to preserve the sort order and add new cases, couldn't
you do something like
gen id = _n
When finished, you could sort by id, and new cases (which would be
missing on id) would get added at the end, right?
At 11:04 AM 8/15/2013, David Kantor wrote:
At 11:29 AM 8/15/2013, Jeph wrote:
Perhaps this is naive of me, but the documentation for
-sortpreserve- states up front that -sortpreserve- is not intended
for programs which modify the data, nor is it appropriate in that
case: "sortpreserve is intended for use in programs that report
results or add new variables to the dataset, not programs that
modify the data in memory."
When all else fails, read the directions.
I mean, I plead guilty for not having done so.
Also, that warning about sortpreserve is consistent with my
inclination about it. But I'm curious to find out what happens if
you do such modifications.
--David
*
* 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/
-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME: (574)289-5227
EMAIL: [email protected]
WWW: http://www.nd.edu/~rwilliam
*
* 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/