Hi there,

I have included a sample of the first 20 people in my data set:

```
head(Dataset2, n=20)
data.frame(
Id = c(1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L,
10L, 11L, 12L, 13L, 14L, 15L, 16L,
17L, 18L, 19L, 20L),
Age = c(47L, 47L, 51L, 50L, 38L, 22L, 37L,
53L, 23L, 38L, 59L, 24L, 33L, 44L,
49L, 51L, 31L, 54L, 32L, 57L),
CPAMs = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 0L,
0L, 0L, 0L, 1L, 1L, 0L, 0L, 0L, 1L,
1L, 0L),
vaccinator = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
1L, 0L, 1L, 1L, 0L, 0L, 1L, 1L, 0L,
0L, 1L),
Pharmacist= c(1L, 1L, 0L, 1L, 0L, 0L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L),
MUR = c(0L, 1L, 1L, 1L, 0L, 0L, 1L, 1L, 0L,
0L, 1L, 0L, 1L, 0L, 0L, 0L, 0L, 1L,
0L, 1L),
MTA = c(0L, 1L, 0L, 1L, 0L, 0L, 1L, 1L, 0L,
0L, 0L, 0L, 1L, 0L, 0L, 0L, 0L, 0L,
1L, 0L),
Prescriber = c(0L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L),
Others = c(0L, 0L, 0L, 1L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 0L,
0L, 0L),
None.apply = c(0L, 0L, 0L, 0L, 0L, 1L, 0L, 0L, 0L,
0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L),
Number.of.years.practice = c(25, 24, 29, 26, 17, 1, 13, 31, 1,
15, 30, 2, 10, 22, 28, 30, 1.5, 32,
10, 34),
Chronic.conditions = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 0L, 1L, 1L, 1L, 1L, 0L, 1L,
1L, 1L),
Elderly.patients.in.their.own.home = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 0L,
1L, 0L, 0L, 1L, 1L, 1L, 1L, 0L, 1L,
1L, 1L),
Elderly.residential.care.facilities = c(0L, 1L, 1L, 1L, 1L, 1L, 1L, 0L, 1L,
0L, 0L, 0L, 1L, 1L, 0L, 0L, 0L, 0L,
1L, 1L),
Other.residential.care.facilities = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 1L, 0L, 0L, 0L, 0L, 1L,
1L, 1L),
Low.socioeconomic.status = c(1L, 1L, 1L, 1L, 1L, 0L, 1L, 1L, 1L,
0L, 1L, 1L, 1L, 1L, 1L, 1L, 0L, 1L,
0L, 1L),
Young.families = c(1L, 1L, 0L, 0L, 0L, 1L, 1L, 1L, 1L,
1L, 0L, 0L, 1L, 1L, 1L, 1L, 0L, 1L,
1L, 1L),
Gender = as.factor(c("Female", "Male",
"Female", "Female",
"Female", "Male", "Male",
"Female", "Male", "Female",
"Male", "Male", "Female",
"Female", "Female", "Female",
"Male", "Male", "Female",
"Male")),
)
```

I am trying to work out the following please with R studio:

1). The following 7 variables: CPAMs, vaccinator, Pharmacist, MUR, MTA, Prescriber, Others, None.apply

are qualifications that a respondent could have (0=no, 1 = yes).

I know how to use the count function to work out how many people have either CPAMs, or how many have vaccinator qualifications, etc.

How to I use R studio to work out how many people in the data set have combinations for the 7 types of qualifications available? For example I might find that in my data set most people have vaccinator and Pharmacist qualifications.

2). The following 6 variables: Chronic.conditions, Elderly.patients.in.their.own.home, Elderly.residential.care.facilities, Other.residential.care.facilities, Low.socioeconomic.status, Young.families

are 6 different client types that a respondent may encounter.

Again, I know how to use the count function to work out how many respondents encounter either Chronic.conditions, or Young.families, etc.

How to I use R studio to work out how many respondents in the data set have encountered combinations for the 6 types of client type? For example I might find that in my data set most respondents have encountered Chronic.conditions, or Young.families.

Hopefully I have explained this well enough.

Any help is appreciated.

Thanks:-)