Calculate percentage/frequency of a value in a survey object
<p>I have a national survey composed of many variables, like this one (for the sake of semplicity I omitted some variables):</p>

<pre><code>year  id  y.b   sex   income  married   pens   weight
2002  1   1950   F    100000     1       0      1.12
2002  2   1943   M    55000      1       1      0.55
2004  1   1950   F    88000      1       1      1.1
2004  2   1943   M    66000      1       1      0.6
2006  3   1966   M    12000      0       1      0.23
2008  3   1966   M    24000      0       1      0.23
2008  4   1972   F    33000      1       0      0.66
2010  4   1972   F    35000      1       0      0.67
</code></pre>

<p>Where id is the person interviewed, y.b is year of birth, married is a dummy (1 married, 0 single), pens is a dummy that takes value one if the person invest in a complementary pension form; weight are the survey weights.</p>

<p>Consider that the original survey is made up to 40k observations from 2002 to 2014(I filtered it in order to have only individuals that appear more than one time). I use this command to create a survey object:</p>

<pre><code>d.s &lt;- svydesign(ids=~1, data=df, weights=~weight)
</code></pre>

<p>Now that the df is weighted I want to find for example the percentage of women or the percentage of married person that invest in complementary pension; I read on R help and on the web to find a command to get the percentage but I didn't find the right one.</p>