This section describes how to copy selected observations or variables to a new data table. The new data table is not dynamically linked to the original data. The original data are not changed.
You can copy selected data by selecting Figure 11.1.
→ → from the main menu, as shown in
When you select
→ → , SAS/IML Studio performs one of the following actions:If no variables or observations are selected, the Choose Variables dialog box opens and prompts you to select one or more variables. (See Figure 11.2.) When you click , the selected variables are copied to a new data table. The variables are copied in the order in which they appear in the original data table.
Figure 11.2: The Choose Variables Dialog Box
If no variables are selected, but there are selected observations, the selected observations (for all variables) are copied to a new data table. You can use this technique to copy data that satisfy certain conditions.
If variables are selected, but there are no selected observations, the selected variables are copied to a new data table. The variables are copied in the order in which they were selected. You can use this technique to reorder variables.
If both variables and observations are selected, the selected observations for the selected variables are copied to a new
data table. The variables are copied in the order in which they were selected. For example, in Figure 11.3 the variables were selected in the order longitude
, latitude
, and category
. (Note that the column headings display numbers that indicate the order in which you selected the variables.) If you copy
the data to a new data table, the new data table contains 12 observations for the longitude
, latitude
, and category
variables, in that order.
Figure 11.3: Selected Variables and Observations