You may have some new variables that you'd like to add to your data after you've started creating your report. There are a variety of ways to do this depending on how you'd like to analyze your data and what type of data you want to add.
- Update the data set with a new, combined copy of the data file that includes the new variables. - This is best if you're planning on using these variables in banners or filters alongside your other variables. Typically you'd do this when merging in new questions in a tracking data set (along with the new cases) and analysis/text coding done outside the software. Having all the variables in the same data set is the most flexible way to work with them in the document, however, there are other options below. You'll want to be sure these new variables are somehow merged into the original raw data file used in the document. Displayr has merge tools to help you with this:
- Add the new data as a new data set in the document and link it to the original data set. - This method is typically used when working with a stacked version of the data alongside an unstacked version. There are some limitations and other guidance found in the article, How to Create Data File Relationships. You can also copy a variable from a linked data set with a one-to-one relationship using JavaScript, see How to Copy Variables Between Linked Data Sets.
- You can paste the data into the Data Editor in Displayr. - This is how you can copy and paste data to Excel. Keep in mind, this is not an efficient way of adding the variable as Displayr has to map each value to each case of the original data. If used a lot or on large data sets, this may cause performance issues.
- You can also create new variables in a plethora of ways inside the software, including using: Save Variable(s) section from analysis outputs on the page, the Transformation section in the object inspector of a variable set, Duplicate and modifying variables, an automation in Anything > Data > Variables menu, filtering tool, weighting tool, and creating custom R and JavaScript variables with code.