Previous Page | Next Page

Functions and CALL Routines

RANGE Function



Returns the range of the nonmissing values.
Category: Descriptive Statistics

Syntax
Arguments
Details
Examples

Syntax

RANGE(argument-1<,...argument-n>)


Arguments

argument

specifies a numeric constant, variable, or expression. At least one nonmissing argument is required. Otherwise, the function returns a missing value. The argument list can consist of a variable list, which is preceded by OF.


Details

The RANGE function returns the difference between the largest and the smallest of the nonmissing arguments.


Examples

SAS Statements Results
x0=range(.,.);
.
x1=range(-2,6,3);
8
x2=range(2,6,3,.);
4
x3=range(1,6,3,1);
5
x4=range(of x1-x3);
4

Previous Page | Next Page | Top of Page