multiResponse in ufs or other easy ways of creating multiresponse sets

Hi,
I am trying to create some multiresponse sets containing 0 and 1s using ufs package but its documentation is really poor: https://www.rdocumentation.org/packages/userfriendlyscience/versions/0.7.2/topics/multiResponse

Do you have any experience in creating multiple response sets? Can you suggest anything?

This is example data which may be used:

library(readxl)
data.source <- read_excel("I:/Departments/Insight Department/7 R&D/R Training/Multi response data.xlsx")

data.source
#> # A tibble: 12 x 6
#>    URN   Blank   Oil   MOT   Rep Other
#>    <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
#>  1 aaa       0     0     0     0     1
#>  2 bbb       0     0     0     0     1
#>  3 ccc       0     1     1     0     0
#>  4 ddd       0     1     1     1     0
#>  5 eee       0     0     1     0     0
#>  6 fff       0     0     0     1     0
#>  7 ggg       0     0     0     0     1
#>  8 hhh       0     0     0     0     1
#>  9 iii       0     1     0     1     0
#> 10 jjj       0     0     0     0     1
#> 11 kkk       1     0     0     0     0
#> 12 lll       0     0     0     0     1

Created on 2019-10-11 by the reprex package (v0.3.0)

I need to create one variable (set) containing all 0-1 variables above. What I have done so far, was creating some data frames manually:

categories <- data.frame(Freq=colSums(data.source[2:6]),
                         Pct.of.Resp=(colSums(data.source[2:6])/sum(data.source[2:6]))*100,
                         Pct.ofCases=(colSums(data.source[2:6])/nrow(data.source[2:6]))*100)

no.blank.categories <- data.frame(Freq=colSums(data.source[3:6]),
                                  Pct.of.Resp=(colSums(data.source[3:6])/sum(data.source[3:6]))*100,
                                  Pct.ofCases=(colSums(data.source[3:6])/nrow(data.source[3:6]))*100)

What do you think?

Please provide a proper reproducible example

I am sorry. I am new to reprex which was always an issue for me.

Here you ago. I hope this is a proper reprex :clap::

URN <- c("aaa", "bbb", "ccc", "ddd", "eee", "fff", "ggg", "hhh", "iii", "jjj", "kkk", "lll", "mmm", "nnn", "ooo", "ppp")
Blank <- c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0)
Oil <- c(0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1)
MOT <- c(0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1)
Rep <- c(0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1)
Other <- c(1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0)
Gender <- c("Male", "Male", "Male", "Male", "Male", "Male", "Female", "Female", "Female", "Female", "Female", "Female", "Male", "Male", "Male", "Male")

response.data <- data.frame(URN, Blank, Oil, MOT, Rep, Other, Gender)

response.data
#>    URN Blank Oil MOT Rep Other Gender
#> 1  aaa     0   0   0   0     1   Male
#> 2  bbb     0   0   0   0     1   Male
#> 3  ccc     0   1   1   0     0   Male
#> 4  ddd     0   1   1   1     0   Male
#> 5  eee     0   0   1   0     0   Male
#> 6  fff     0   0   0   1     0   Male
#> 7  ggg     0   0   0   0     1 Female
#> 8  hhh     0   0   0   0     1 Female
#> 9  iii     0   1   0   1     0 Female
#> 10 jjj     0   0   0   0     1 Female
#> 11 kkk     1   0   0   0     0 Female
#> 12 lll     0   0   0   0     1 Female
#> 13 mmm     1   0   0   0     0   Male
#> 14 nnn     0   1   1   1     0   Male
#> 15 ooo     1   0   0   0     0   Male
#> 16 ppp     0   1   1   1     0   Male



categories <- data.frame(Freq=colSums(response.data[2:6]),
                         Pct.of.Resp=(colSums(response.data[2:6])/sum(response.data[2:6]))*100,
                         Pct.of.Cases=(colSums(response.data[2:6])/nrow(response.data[2:6]))*100)
categories
#>       Freq Pct.of.Resp Pct.of.Cases
#> Blank    3    12.50000       18.75
#> Oil      5    20.83333       31.25
#> MOT      5    20.83333       31.25
#> Rep      5    20.83333       31.25
#> Other    6    25.00000       37.50

no.blank.categories <- data.frame(Freq=colSums(response.data[3:6]),
                                  Pct.of.Resp=(colSums(response.data[3:6])/sum(response.data[3:6]))*100,
                                  Pct.of.Cases=(colSums(response.data[3:6])/nrow(response.data[3:6]))*100)
no.blank.categories
#>       Freq Pct.of.Resp Pct.of.Cases
#> Oil      5    23.80952       31.25
#> MOT      5    23.80952       31.25
#> Rep      5    23.80952       31.25
#> Other    6    28.57143       37.50

Created on 2019-10-14 by the reprex package (v0.3.0)

I need to create one variable containing all 0/1 responses (and its version without blanks) which could be used in further analysis, tabulations etc. What is required is Pct.ofCases which is usually higher than 100%. Multiresponse sets are very common in market research as every question when you select more than one response is treated as multiresponse set. Some of these questions contain more than 30 variables so it's important to find a way in R which is relatively simple in SPSS or other stats tools.

One of examples of required tables is this SPSS table prepared in a couple of minutes:

categories	Total_Count	Total_Pct.of.Cases	Female_Count	Female_Pct.of.Cases	Male_Count	Male_Pct.of.Cases
Blank	3	18.8%	1	16.7%	2	20.0%
Oil	5	31.3%	1	16.7%	4	40.0%
MOT	5	31.3%	0	0.0%	5	50.0%
Rep	5	31.3%	1	16.7%	4	40.0%
Other	6	37.5%	4	66.7%	2	20.0%
Total	16	100.0%	6	100.0%	10	100.0%