multiResponse {ufs} | R Documentation |
The multiResponse
function mimics the behavior of the table produced
by SPSS for multiple response questions.
multiResponse( data, items = NULL, regex = NULL, perlRegex = TRUE, endorsedOption = 1 )
data |
Dataframe containing the variables to display. |
items, regex |
Arguments |
perlRegex |
Whether to use the perl engine to match the regex. |
endorsedOption |
Which value represents the endorsed option (note that producing this kind of table requires dichotomous items, where each variable is either endorsed or not endorsed, so this is also a way to treat other variables as dichotomous). |
A dataframe with columns Option
, Frequency
,
Percentage
, and Percentage of (X) cases
, where X is the number
of cases.
Ananda Mahto; implemented in this package (and tweaked a bit) by Gjalt-Jorn Peters.
Maintainer: Gjalt-Jorn Peters gjalt-jorn@userfriendlyscience.com
This function is based on the excellent and extensive Stack Exchange answer by Ananda Mahto at https://stackoverflow.com/questions/9265003/analysis-of-multiple-response.
multiResponse(mtcars, c('vs', 'am'));