Function to get number of cases (textual switches) based on question text
rte.get.n.cases(str.in)
The full text of the question
n.cases Number of cases (textual switches in string)
# NOT RUN { my.question <- 'My questions is ... @{ver1}|{ver2}@' ## two cases n.cases <- rte.get.n.cases(my.question) # }
Run the code above in your browser using DataCamp Workspace