# How to get weighted summaries of survey responses in R

I am analysing survey data. Since my demographic categories are discrete I can summarise responses within demographics using prop.table. However, I would also like to be able to summarise responses using survey weights. How do I do that?

See the functions svybyand svymean for some nice examples. Note that you have to specify the survey design via svydesign, which takes the weights as an argument, before applying the other functions.