Recode - Set Value of Don't Knows to NaN
Jump to navigation
Jump to search
Q Technical Reference
Q Technical Reference
Q Technical Reference > Setting Up Data > Creating New Variables
Q Technical Reference > Setting Up Data > Data Cleaning QScripts
Q Technical Reference > Updating and Automation > Automation Online Library
Q Technical Reference > Updating and Automation > JavaScript > QScript > QScript Examples Library > QScript Online Library
This tool sets the value of any Don't Know categories in Pick One, Pick One - Multi, Number, and Number - Multi questions to NaN.
You will be notified to check any recoded data that was identified as having two or more Don't Know style options.
Technical details
Phrases that are identified as Don't Know type responses are ones that contain one or more of:
- dk
- dont know
- don't know
- don t know
- unsure
- not sure
- do not know
- no idea
- not applicable
The matching of these is not case sensitive.
Additionally, where a label is, in its entirety, NA or na, it is treated as a Don't Know.
Usage
To use this tool in Q:
- Select Automate > Browse Online Library > Recode > Set Value of Don't Knows to NaN
- Choose whether you wish to add your own custom text to search for in addition to the standard Don't Know style responses listed above
- Choose which questions you wish to modify from the list presented
includeWeb('QScript Functions for Removing Dont Know Categories');
removeDKInSelection(false);
See also
- QScript for more general information about QScripts.
- QScript Examples Library for other examples.
- Online JavaScript Libraries for the libraries of functions that can be used when writing QScripts.
- QScript Reference for information about how QScript can manipulate the different elements of a project.
- JavaScript for information about the JavaScript programming language.
- Table JavaScript and Plot JavaScript for tools for using JavaScript to modify the appearance of tables and charts.
Q Technical Reference
Q Technical Reference
Q Technical Reference > Setting Up Data > Creating New Variables
Q Technical Reference > Setting Up Data > Data Cleaning QScripts
Q Technical Reference > Updating and Automation > Automation Online Library
Q Technical Reference > Updating and Automation > JavaScript > QScript > QScript Examples Library > QScript Online Library