title: Saving weighted survey as data frame
body: <p>I would like to analyze a survey which was analyzed in the past with the SPSS software. The survey has a weight variable.</p>
  
  <p>In SPSS it's easy to weight by variable (with the 'weight by' function) But I have problems while tring to do so with R.</p>
  
  <p>I used the Survay package to include the weight variable. I will show here a more simple example:</p>
  
  <pre><code>    Data &lt;- data.frame(
      X =c(1,4,6,4,1,7,3,2,2),
      Y = c(6,5,9,9,43,65,45,67,90),
      weight=c(0.1,1.2,4,0,0,5,0.65,1,0)
      )
      summary(Data )
  </code></pre>
  
  
  
  <pre><code>      X               Y             weight     
   Min.   :1.000   Min.   : 5.00   Min.   :0.000
   1st Qu.:2.000   1st Qu.: 9.00   1st Qu.:0.000
   Median :3.000   Median :43.00   Median :0.650
   Mean   :3.333   Mean   :37.67   Mean   :1.328
   3rd Qu.:4.000   3rd Qu.:65.00   3rd Qu.:1.200
   Max.   :7.000   Max.   :90.00   Max.   :5.000
  </code></pre>
  
  
  
  <pre><code>    library(survey)
      dat_weight=svydesign(ids = ~1, data = Data , weights = Data $weight)
  </code></pre>
  
  <p>Now I would like to save this object (dat_weight) as a simple data frame and use it for other analyses (such as PCA, CA, and so on).</p>
  
  <p>Can it be done?</p>