Skip to content

Instantly share code, notes, and snippets.

abhishek abhishekdagarit

Block or report user

Report or block abhishekdagarit

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@abhishekdagarit
abhishekdagarit / Importing a file in SAS.md
Last active Sep 27, 2017
Creating/Importing data in SAS
View Importing a file in SAS.md

Creating/Importing a file in SAS


Creating a dataset inside SAS

There is a simple way to add some data inside data step.

It uses datalines

View SAS rules.md

SAS rules

Case sensitive

SAS in not case sensitive.

proC PrinT daTa = woRK.IntrO;
WHerE Rating = 2;
run;
View Sort function in SAS.md

Sort function in SAS

By

Basic sort function. Uses by.

proc sort data=work.test;
by Salary;
View Sum of variables.md

Sum of single variable

Simply write sum followed by the variable name.

proc print data=test;
sum salary;
run;
View Calculating mean in SAS.md

Calculating mean in SAS

To calculate mean simply use proc means

proc means data = work.test;
var ratings;
run;
View Special cases.md

Special cases

Maximum number of decimal places

proc print data=work.temp maxdec=2;
run;

labels in SAS

View Frequency in SAS.md

Frequency in SAS

Used using the proc freq statement

complete frequency table

proc freq data=work.test;
run;
View Global statements in SAS.md

Global statements in SAS

List of global statements in SAS

  1. title
  2. options
  3. footnote

Properties of global statements in SAS

@abhishekdagarit
abhishekdagarit / SQL select statement.md
Last active Sep 27, 2017
Basic SQL commands to be used in SAS as well as any other place.
View SQL select statement.md

SQL select statement

Select

Simplest Select satament

proc sql;
select * 
View Merging datasets in SAS.md

Merging datasets in SAS

The process is straight forward.

Data 1

data d1;
input name$ age;
You can’t perform that action at this time.