Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: AW: Adding rows to datasheet

From   "Nick Cox" <>
To   <>
Subject   RE: st: AW: Adding rows to datasheet
Date   Tue, 23 Mar 2010 20:14:50 -0000

Quite possibly, but I meant I didn't invent that example either.  


Martin Weiss

No need for anything by way of -set obs-, which by the way I am sure I
didn't invent!"

I guess Philipp was more concerned about the " `=_N+1' " part of the
obs- statement which he may have snapped up in your post:

Nick Cox

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!


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 <> 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:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index