This should be easy but I'm having a lot of difficulty.

I have a relatively large dataset of medications, [![looks like this:](https://i.stack.imgur.com/BOwCL.png)](https://i.stack.imgur.com/BOwCL.png)

What I want is a table of frequencies, but ranging over ALL the columns - so I want the medication that appears the most commonly from columns 1:8.

My idea was to combine all of these columns into one long column, just one on top of the other. However, I have tried multiple function (stack, melt, matrix), but they all give me bizarre results. The one that seems correct for me to use is stack, but it keeps returning the error message "Error in stack.data.frame(meds) : no vector columns were selected". I've seen this error on the message boards before - I tried converting into as.vector, but this is not working. The object is definitely of class dataframe. 

If there is another way to achieve these table results, that would be great, but either way, it's not working right now. Could somebody help?