Statalist


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

Re: st: Trouble with `=`_N'-1'


From   Johannes Geyer <JGeyer@diw.de>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Trouble with `=`_N'-1'
Date   Mon, 1 Sep 2008 13:33:53 +0200

Ashim wrote:
> I wish to make a change in the 2nd last observation.
> 
> so I have : replace line = 5 in `=`_N'-1'

try:

replace line = 5 in `=_N-1'

Hope this helps,

Johannes


> 
> But this change the LAST observation! Am I doing something wrong?
> 
> funnily replace line = 5 if _n==_N-1 works fine!
> 
> Any tips?
> 
> Thank you,
> Ashim.
> *
> *   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index