title: A cross table in R
body: <p>I have a data frame like this one:</p>
  
  <pre><code>   v1   v2  wght
  1  3    5   0.2
  2  2    8   0.5
  3  3    5   0.6
  ................
  </code></pre>
  
  <p>So I want to produce some descriptive statistics for multiple variables, a cross table more precisely. The values of v1 and v2 are all integers between 1 and 10 and wght is a weight variable. The desired result should be a data frame like this one for example:</p>
  
  <pre><code>        v2_1 ... v2_5 ... v2_8 ...   v2_10
  v1_1
  v1_2                       0.5
  v1_3         0.8=0.2+0.6
  ...
  v1_10
  </code></pre>
  
  <p>where in each cell you have the number of people who are v2_i amongst those who have v1_j for i and j in [1:10]. These data should be weighted by wght.
  I tried using Crosstable but the results are impossible to be used afterwards because I need a data frame. Thanks in advance</p>