DUPLICATE

 

Usage:

DUPLICATE allows for duplicating existing variables maintaining the data, variable title, and variable labels. Using the duplicate feature is extremely handy when needing to make data adjustments without altering an existing variable. Duplicated variables can be saved directly to the data using the Save Data As option of Setup|Glossary Variables. Duplicated variables are added to the end of the data file and in the order specified in the Glossary.

 

 

Syntax:

DUPLICATE new variable = existing variable

or

DUP new variable = existing variable

 

Abbreviation: DUP

 

 

Example:

Glossary sytnax: DUPLICATE AGE = QD1

 

 

Data grid view of the newly duplicated variable:

 

 

 

Advanced DUPLICATE example:

Glossary sytnax:

IF QD1 (1-5)

DUPLICATE NEWVARIABLE = QD7

ENDIF

Using the above syntax WinCross will DUPLICATE QD7 into NEWVARIABLE and also apply the filter of QD1 (1-5).

 

 

 

Note:

1. Indexed variables cannot be used with the DUPLICATE instruction.

2. New variables duplicated in the Glossary can be used with LOC+.

3. New variables duplicated in the Glossary cannot be used with VAR+ without first saving the data file using the Save Data As option on the Setup Glossary Variables dialog.

 

Related topics:

Glossary Variables