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 use of %include statement?

1036


what are all the reports you generated in your recent project?

2183


Tell e how how dealt with..

2239


How is character variable converted into numeric variable and vice versa?

1157


What is the difference between SAS functions and procedures?

1137


what r the job openings SAS for fresher graduates !

2436


Why and when do you use proc sql?

1227


What was the last computer book you purchased? Why?

2368


Mention what is the difference between nodupkey and nodup options?

1000


What are the special input delimiters used in SAS?

1157


what are some good sas programming practices for processing very large data sets? : Sas programming

912


What is the length assigned to the target variable by the scan function?

1136


Difference between nodup and nodupkey options?

1169


how can you create zero observation dataset? : Sas programming

1125


what is the function of catx syntax? : Sas-administrator

1085