Suppose I am having the following data. [As requested I am adding the data]

```
col1 <- c("Team A", "Team A", "Team A", "Team B", "Team B", "Team B", "Team C", "Team C", "Team C", "Team D", "Team D", "Team D")
col2 <- c("High",   "Medium", "Medium", "Low", "Low", "Low", "High", "Medium", "Low", "Medium", "Medium", "Medium")
col3 <- c("Yes", "Yes", "No", "No", "No", "Yes", "No", "Yes", "No", "Yes", "Yes", "Yes")
col4 <- c("No", "Yes", "No", "Yes", "Yes", "No", "No", "Yes", "No", "Yes", "No", "Yes")
df <- data.frame(col1, col2, col3, col4)

```

```
# Col1      Col2    Col3    Col4
# Team A    High    Yes     No
# Team A    Medium  Yes     Yes
# Team A    Medium  No      No
# Team B    Low     No      Yes
# Team B    Low     No      Yes
# Team B    Low     Yes     No
# Team C    High    No      No
# Team C    Medium  Yes    Yes
# Team C    Low     No     No 
# Team D    Medium  Yes    Yes
# Team D    Medium  Yes    No
# Team D    Medium  Yes    Yes

```

I want to use `dplyr` function to get the following result. Status\_1 would need to be the count of the number of "Yes" in Col3 against each team while Status\_2 would be the count of "Yes" in Col4 against each team

```
       High Medium  Low Status_1    Status_2
Team A    1      2    0        2           1
Team B    0      0    3        1           2
Team C    1      1    1        1           1
Team D    0      3    0        3           2

```

I am able to generate the normal summary but for the last two columns of "Status\_1" and "Status\_2" using the following statement. Can anyone help, please? 

```
df %>%
  group_by(Col1, Col2) %>%
  summarise(Count = n()) %>%
  spread(Col1, Count, fill = 0)

```