Example: Transforming the Data in the BASEBALL Data Set
-
In the
Tasks section,
expand the
Data folder, and then double-click
Transform
Data. The user interface for the Transform Data task
opens.
-
On the
Data tab,
select
SASHELP.BASEBALL as the input data
set.
Tip
If the data set is
not available from the drop-down list, click
. In the
Choose a Table window,
expand the library that contains the data set that you want to use.
Select the data set for the example and click
OK.
The selected data set should now appear in the drop-down list.
This figure shows a
subset of the data for the Name, nRuns, and Salary columns.
-
To transform the data
in the nRuns column, complete these steps under the
Transform
1 heading:
-
To the
Variable
1 role, assign the
nRuns column.
-
From the
Transform drop-down
list, select
Natural log.
-
To convert the values
in the Salary column to dollars, complete these steps under the
Transform
2 heading:
-
To the
Variable
2 role, assign the
Salary column.
-
From the
Transform drop-down
list, select
Specify custom transformation.
-
In the
Custom
transform box, enter
Salary*1000
.
-
To run the task, click
.
Copyright © SAS Institute Inc. All rights reserved.