You can use a VAR clause with the CREATE statement to select the variables that you want to include in the new data set.
The syntax is as follows:
In the previous example, the new data set Ratio
had one variable. You can use the VAR clause to create a similar data set to contain both HWRatio
and Name
. Notice that the variable HWRatio
is numeric and the variable Name
is character. Consequently, these two variables cannot coexist in a single matrix. The following statements create a new
data set, Ratio2
, to contain the variables Name
and HWRatio
:
create Ratio2 var {"Name" "HWRatio"}; append; show contents; close Ratio2;