Data manipulation in Displayr involves the creation and manipulation of variable sets. This article describes how to combine, split, duplicate, change the values of, reset, and create new variable sets.
Combining and splitting variable sets
Variable sets can be grouped together, by selecting them and pressing Combine. They can be split into multiple variable sets, each of which contains one variable, by pressing Split.
Duplicating variable sets
Duplicating It can be useful to have multiple versions of the same data. For example, maybe you want to show age in some analyses with all its categories, and in other analyses grouped into Under 45 and 45 or more. This is done by selecting a variable set and pressing Duplicate, and then modifying the duplicate as per your needs.
Some new users are reticent to do this, as they fear that the app will slow down as the resulting data file gets larger. However, duplicating a variable set does not duplicate the underlying data, so this concern isn't justified.
Changing the structure of a variable set
The table below summarizes a Nominal - Multi variable set. It is, in essence, six summary tables of ordinal variables, spliced together.
Sometimes it is useful to replace a table like the one above with a table like the one below, which contains the percentages of people who said Love or Like. Such a table is more readily crosstabbed with other data.
To create a table like this:
- Change the Structure to Binary - Multi.
- Press the Select categories button (or, press Fix).
- Choose the categories you wish to use in the percentages in the Count this Value column. If you wish to ignore a category from the denominator of the percentage, change the setting in the Missing Values column.
By changing the structure to Numeric - Multi, we instead see averages:
Changing the values of numeric variables (recoding Value Attributes)
The precise average that is calculated depends on how the data has been stored. For example, Hate may be stored as, for example, a -2 or a 0. To review and potentially change these values, press object inspector > Properties > General > DATA VALUES > Values. Then, replace the values in the Values column. You can also specify that the category is treated as missing in the Missing Values column.
You can reset the various attributes of a variable set by selecting the variable and clicking the Reset menu.
Creating new variables
In addition to creating new variable sets by duplicating them and modifying them, you can also create new variables by clicking the floating + button that appears when you hover over variables in the Data Sets tree, as shown below. Common ways of creating new variables include:
- Ready-Made New Variables, which contain the most common ways of creating new variables. For example, the recording below shows the creating of an NPS variable.
- Text Categorization, which involves converting text data into categorical or numeric variables.