Combining Formulas and Queries in Data Manager
Formulas can be used together with queries to perform powerful operations on data.
Formulas are always computed on the data currently shown; it is therefore possible to define formulas only for a subset of the dataset.
The examples are all based on the Adult dataset.
Example
In our example we want to change all the Prof-school strings in the education attribute to Professional-school.
To quickly perform this operation:
Select all the records that contain Prof-school by applying a filter.
In the formula bar define education as Professional-school, delimiting the string with double quotes.
Remove the filter.
In this way only the Prof-school values have been re-defined whereas the other values are left unchanged.
Alternative operation
The same result could be obtained by using the ifelse operator, using the formula shown below: