Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: drop in 1925486/1 leads to: Obs. nos. out of range, r(198)


From   "Sergiy Radyakin" <[email protected]>
To   [email protected]
Subject   Re: st: drop in 1925486/1 leads to: Obs. nos. out of range, r(198)
Date   Sat, 13 Sep 2008 12:59:51 -0400

Hi there,

it would have been a silver bullet in this case if -save- had if- and
in-modifiers.

save "Part1" in 1/1925485
save "Part2" in 1925486/l

but as I've learned from earlier discussions the reason that this is
not done is becuase there is no consensus of whether to consider the
dataset saved or not afterwards -- an unassailable argument.

Sergiy Radyakin


On Fri, Sep 12, 2008 at 2:19 PM, Eva Poen <[email protected]> wrote:
> Nick is of course correct. I assumed Silke would -use- her data,
> -save- part one, -use- again, and -save- part two. Silke should follow
> the advice generally voiced on this list: don't overwrite your data on
> disk; and only -save- the data if you really have to. If Silke saves
> all her commands in do-files, she would always be able to recreate
> what she's done.
>
> I'd like to add that what exactly is in the first 1925485 observations
> in Silke's data depends on the sort order of the data. If the -sort-
> command does not uniquely identify observations (like -sort foreign-
> in the auto data), part of the -sort- will be random, and this might
> not be what Silke wants. She can find out about the sort order of her
> data by using -describe- and reading the note at the bottom.
>
> Eva
>
>
> 2008/9/12 Nick Cox <[email protected]>:
>> If you -drop- the second part of the data, you can certainly -save- the
>> first part to somewhere else. But once you then -drop- the first part,
>> you are left with nothing and no scope to -save- anything anywhere.
>>
>> What version you have is immaterial here. Nothing can only be saved as
>> nothing, or not saved as anything, which is the same in practice.
>>
>> What you want to do may be more like
>>
>> preserve
>> drop in 1925486/l
>> save part1
>> restore
>> keep in 1925486/l
>> save part2
>>
>> Nick
>> [email protected]
>>
>> Silke
>>
>> I want to divide my data into two seperate files. So I would first like
>> to use -drop in 1925486/1- to delete the last rows of the data and save
>> the remaining part. Then I want to use -drop in 1/1925485- to delete the
>>
>> first part in order to save the rest of the data in a second file.
>>
>> Perhaps it does not work because it is version 8..
>>
>> Eva Poen
>>
>>> it should be  -drop in 1/1925486-, not the other way round. Or did you
>>> mean -drop in 1925486/l- ? Note the "l", for last, instead of "1".
>>>
>>
>>> 2008/9/12 - <[email protected]>:
>>>
>>>
>>>> I use Stata Version 8 and do not know what I am doing wrong:
>>>>
>>>> The command:
>>>>
>>>> . drop in 1925486/1
>>>>
>>>> leads to the following error:
>>>>
>>>> Obs. nos. out of range
>>>> r(198);
>>>>
>>>> Does anyone know what is wrong?
>>
>> *
>> *   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/
>
*
*   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