A Data Set in Displayr and Q is a representation of a Flat Data File. It has the following properties:
- It is associated with one data source, which will either be:
- A data file.
- A table generated by an SQL query.
- A table created by R code.
- The data source has a Flat Data File structure, where rows represent observations (i.e., cases, observations), and columns represent variables.
- Variables are mutually, exclusively, and exhaustively grouped into variable sets.
- Tables are constructed by specifying their input variable sets.
- A Data Set appears as a folder in the Data Sources tree in Displayr, or the Data tab in Q.
- Although a Data Set can by analyzed using R, it is not in any way created or modified via R.
- Under the "hood" of Displayr is a dependency graph that maps the relationships between all of the variables and the raw data file.
- The data source associated with a Data Set may be changed, by clicking on the Data Set in the Data Sources tree, and updating from within the Object Inspector in Displayr. In Q, the data set can be changed by going to File > Data Sets > Update. If the original data file is changed, or any property of one of the variables is changed, everything in the data set will automatically update to reflect the change.
Importing or creating a Data Set
In Q: How to Import Data Sets in Q
In Displayr: How to Import Data Into Displayr
How Displayr and Q automatically organize data in a Data Set
When a data set is created, Displayr and Q:
- Automatically searches through the data and automatically groups variables into variable sets based on similarities in their metadata.
- Manually 'fixes' a number of common problems in the data file.
For more information see How Variable Sets/Questions are Automatically Grouped and Labeled.
Undoing Displayr and Q's automatic data organization
Occasionally, Dispalyr and Q automatically organize data in ways that are not desired. You can always change the data to another format. The main ways of doing this are:
- Changing the Variable Set Structures & Question Types.
- Where the variable has been automatically converted from text to categorical (nominal):
- Select the categorical variable in the Data Sources tree in Displayr or Variables and Questions tab in Q, and select Delete.
- Click on the original variable and rename it (removing " - text" from the end of the label).
- In Displayr, in the Object Inspector, untick Data > Properties > Hidden (except in variables and code). In Q, click the H in the Tags column.