Epi Info™ User Guide

Command Reference


Analysis Commands: Define Group Command

Description
This command allows you to create temporary group variables.

Syntax
DEFINE <variable> GROUPVAR <variable 1> [<variable 1> …]

  • <variable> represents the new group variable being defined.
  • <variable 1> … represent the existing variables to which the new group variable will be equivalent.

Program Specific Feature
Field variables, not defined variables must be in the group. Variables in the group may be from different pages of the same or different forms, in any combination. They may themselves be group variables, but each variable will be represented in the new group only once no matter how many times it appears in the variable list or in group variables in the variable list.

If the group variable being defined exists and is not a group variable, an error message is displayed and the command is not processed. If it is a group variable, the new variable list replaces the existing variable list until the next READ or MERGE command or until it is redefined again. Group variables cannot be undefined.

Comments
This command is useful when there are many variables so that the use of * is impractical or invalid. Group variables can be used in the LIST and WRITE commands and in some statistical commands (e.g., FREQ, TABLES, and MEANS). Group variables cannot be used in Complex Sample commands.

Example

READ {.\Projects\Sample\Sample.prj}:Oswego 
DEFINE Exposure GROUPVAR JELLO CAKES VANILLA CHOCOLATE  
LIST Exposure
Page last reviewed: September 16, 2022, 12:00 pm