Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is LAG function?How is it used? can any one explain

Answer Posted / naveen

this Question was raised by saddi soorath....

lag function enables you to have the previous value.

we have the following data
Name num
Naveen 1
Naveen 2
Basha 1
Basha 2

so in data step
if u give num1 =lag(num) you will have the following result

Name num num1
Naveen 1 .
Naveen 2 1
Basha 1 .
Basha 2 1

Thanks and regards

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between reading data from an external file and reading data from an existing data set?

1224


Given an unsorted data set, how to read the last observation to a new data set?

1403


explain about sas business intelligence? : Sas-bi

1190


what does the run statement do? : Sas programming

1097


What does PROC print, and PROC contents do?

1273


Describe the function and utility of the most difficult SAS macro that you have written?

2625


Give e an example of..

2377


Will it bother you if the guy at the next desk times the frequency and duration of your bathroom or coffee breaks on the grounds that ?you are getting paid twice as much as he is??

2667


How many data types are there in SAS?

1128


How might you use MOD and INT on numeric to mimic SUBSTR on character Strings?

1403


describe how to adjust the performance of data integrator? : Sas-di

1057


Tell e how how dealt with..

2263


What do the SAS log messages "numeric values have been converted to character" mean?

1428


how to do user inputs and command line arguments in sas?

3086


for what purpose would you use the retain statement? : Sas programming

1143