Hi. I'm learning R and I have the following matrix with categorical variables.

```
V1 V2 V3 V4 V5
YES NO NO YES NO
YES YES YES NO YES
NO YES YES YES NO
YES NO YES YES YES
YES NO YES NO YES
YES YES NO YES YES
NO YES NO NO NO
YES YES NO YES YES
YES YES YES YES NO
NO NO YES YES YES
```

I'm looking for a way to count how many times each category appears in each variable and create a matrix with the count of all the columns together. Something like this.

```
YES 7 6 8 5 3
NO 3 4 2 5 7
```

Any suggestions? The Count and Table function of R only allow one Column at a time.

Thank you!