Bookmark and Share

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: AW: Adding rows to datasheet


From   Sripal Kumar <[email protected]>
To   [email protected]
Subject   Re: st: AW: Adding rows to datasheet
Date   Tue, 23 Mar 2010 16:37:00 -0400

I am glad that I was able to atleast convey the problem..though it
doesnt look like there is a simple solution.

On Tue, Mar 23, 2010 at 4:22 PM, Martin Weiss <[email protected]> wrote:
>
> <>
>
> "1.  First observation in data editor of stata---Bell  2009 45  prospective
> 2.  Type:  stata 2010 100 retrospective --into excel and see if you
> can paste it back into stata"
>
>
>
> Yes, with this example, you are fully vindicated. Stata 10.1 does indeed
> make the second row of data the variable names (which you called "header").
> Stata 11 handles the same problem much more elegantly, and leaves the names
> alone...
>
>
> HTH
> Martin
>
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Sripal Kumar
> Sent: Dienstag, 23. März 2010 21:18
> To: [email protected]
> Subject: Re: st: AW: Adding rows to datasheet
>
> Aha.  I see why you can do it and I cant.  Before that, yes--by header
> I meant the variable information and not the observation.
>
> I tried to do what you did and it works well.  But then I realized
> thats because you used all numeric variables only.  Pls try this
>
> 1.  First observation in data editor of stata---Bell  2009 45  prospective
> 2.  Type:  stata 2010 100 retrospective --into excel and see if you
> can paste it back into stata
>
> When I tried to do this, it replaces the variable information with the
> new row you paste.
>
>
> On Tue, Mar 23, 2010 at 3:59 PM, Nick Cox <[email protected]> wrote:
>> Stata doesn't have "headers". I don't know what you mean here, the first
>> observation or the variable information shown in the Editor.
>>
>> I don't usually add extra rows -- Stata terminology is observations --by
>> copy and paste, but I just tried it from an application called MS Excel
>> which I found on my Windows machine.
>>
>> 1. Typed one observation with 1 2 3 into Stata Editor.
>>
>> 2. Typed one row with 3 4 5 into said MS Excel.
>>
>> 3. Copied that row and pasted it into new row in Editor. Worked fine.
>>
>> No need for anything by way of -set obs-, which by the way I am sure I
>> didn't invent!
>>
>> Nick
>> [email protected]
>>
>> Sripal Kumar
>>
>> Tried set obs `=_N+1'.  It does create an extra row but when I use the
>> editor to paste into it, nothing pastes into that row. It goes to
>> replace the header!!!
>>
>> On Tue, Mar 23, 2010 at 10:12 AM, Cohen, Elan <[email protected]> wrote:
>>> Have you tried increasing the number of observations first, then
>> pasting your variables?
>>>
>>> For instance, if you'd like to add one row, first type:
>>>
>>> set obs `=_N+1'
>>>
>>> then try pasting your data into the editor window.
>>
>>
>> *
>> *   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/
>

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index