Description Usage Arguments Value Examples
This function is to check if the variable contains unique answer. Return TRUE when it does while return FALSE when it does not. For example, DK (code 98) should exist in a MA question alone; if DK (code 98) exist along with others codes in a MA question, the function will return FALSE.
1 | check_unique(vector, unique_code)
|
vector |
variable to be checked |
unique_code |
specify unique code |
vector
1 | check_unique(c("1,2,3", "1,2", "1"), 1)#FALSE FALSE TRUE
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.