O'Reilly logo

SAS Functions by Example, Second Edition, 2nd Edition by Ron Cody

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Functions That Determine the Ordering of Data Values

Function:    MIN

Purpose:    To determine the smallest non-missing value in a list of numeric values.

Syntax:      MIN(<of> numeric-values)

numeric-values is either a list of numeric values (numeric variables or numbers), separated by commas, or a list of variables in the form BASEn–BASEm (e.g., X1–X5). If the latter style is used, you must place the word "of" before the list.

If all of the arguments are missing, this function will return a missing value.

Examples

For these examples, X = 5, Y = ., Z = 7, X1 = 1, X2 = 2, X3 = 3, X4 = .

 

Function      

Returns

MIN(X,Y,Z)

5

MIN(OF X1-X4)

1

MIN(10,20,. ,30,40,50)

10

MIN(OF X1-X4,Y,Z)

1

See Program 7.5 for an example. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required