inlist_str | R Documentation |
Works the same as inlist but for strings. It determines if the character of interest (i.e. the category) has been checked in mutiple choice questions bound as vectors of delimited string characters e.g. inlist_str(c("peas, carrots","peas, beans, apple","cheese, nuts","peas, pineapple"),"peas") would return 1, 0, 1, 1 as it searched for 'peas' in a list and only the 1st, 3rd, and 4th elements contained 'peas'. this is similar to grepl
inlist_str(
srch_var,
match_var,
delimiter = "@@#@@",
threshold = 1,
binary_return = TRUE
)
srch_var |
a vector of characters each a delimited list of string items, see inlist. This is common output to mutliple choice questions. |
match_var |
an atomic or vector or values to match against each element. for example if you wanted to know who selected options "peas" and "carrots" then this argument would be c("peas","carrots") |
delimiter |
the delimiter used for the data. default is set to ", " |
inlist_str_function()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.