Show Menu
Cheatography

SAS cheatsheet SAS Studio Academics

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Comparison Operators

=
EQ
equals
IF gender EQ ‘M’;
^= or ~=
NE
not equal
IF salary NE . ;
GT
greater than
IF salary GT 4500;
GT
less than
IF salary LT 4500;
>=
GE
greater than or equal
IF salary GE 4500;
<=
LE
less than or equal
IF salary LE 4500;
in
IN
selecting multiple values
IF country IN(‘US’ ’IN’);

LOGICAL OPERATORS

&
AND
Both conditions true
IF gender =’M’ and age =1;
|
OR
Either condition true
IF gender =’M’ or age =1;
~ or ^
NOT
Reverse the statement
IF country not IN(‘US­’,’­IN’);
 

Trics

INPUT Q1-Q4;
Insert 4 columns