LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (November 2006, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 9 Nov 2006 19:25:16 -0800
Reply-To:     shiling99@YAHOO.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         shiling99@YAHOO.COM
Organization: http://groups.google.com
Subject:      Re: Looking for a function similar tio LAG1... or LAG<n>
Comments: To: sas-l@uga.edu
In-Reply-To:  <3CD71CB2C829034190B365096A4BF02E020591B0@shfexchange.sistemas>
Content-Type: text/plain; charset="us-ascii"

Sorting is not necessary. One way is to use direct access reversely or point access, then use direct access reversely again. The other way is to use two set statements with one using direct access or point access.

HTH

Marrufo wrote: > Hi there, > I would like to obtain the same result as LAG(-1)(old).... any help?... but I would not like to use the: proc sort data=sasdataset; by descending _n_; and then apply newvar=lag1(oldvar) > > Thanks in advance. > EM


Back to: Top of message | Previous page | Main SAS-L page