Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | "Martin Weiss" <martin.weiss1@gmx.de> |
To | <statalist@hsphsun2.harvard.edu> |
Subject | RE: st: AW: Adding rows to datasheet |
Date | Tue, 23 Mar 2010 21:27:27 +0100 |
<> " What version of Stata do you have?" Everything said here is for Stata 10.1... HTH Martin -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Eric Booth Sent: Dienstag, 23. März 2010 21:26 To: statalist@hsphsun2.harvard.edu Subject: Re: st: AW: Adding rows to datasheet > Sripal: I tried your example and it works for me--I can copy/paste into excel and back into Stata and it doesnt replace the variable names. What version of Stata do you have? (I'm curious whether previous versions of Stata behave differently) ~ Eric __ Eric A. Booth Public Policy Research Institute Texas A&M University ebooth@ppri.tamu.edu Office: +979.845.6754 On Mar 23, 2010, at 3:17 PM, Sripal Kumar wrote: > 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 <n.j.cox@durham.ac.uk> 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 >> n.j.cox@durham.ac.uk >> >> 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 <cohened@upmc.edu> 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/