title: Convert columns in a list to a data frame in R
body: <p>I have the following list that created using R,</p>
  
  <pre><code>set.seed(326581)
  X1=rnorm(10,0,1)
  Y1=rnorm(10,0,2)
  data=data.frame(X1,Y1)
  
  lst &lt;- replicate(
    100,
    df.smpl &lt;- data %&gt;% sample_n(10, replace = T),
    simplify = FALSE)
  </code></pre>
  
  <p>this list represents 100 samples where each sample has 2 columns (X,Y) with a sample size of 10.</p>
  
  <p>I need to separate all the X columns into one data frame and Y columns into one data frame.  So finally i should have 2 data frames each have 100 columns and 10 rows. </p>
  
  <p>I tried this loop , </p>
  
  <pre><code>new1=c()
  new2=c()
  for(i in 1:100)
  {
    new1[i]=lst[[i]]$X
    new2[i]=lst[[i]]$Y
  }
  </code></pre>
  
  <p>But it is not working. Can anyone tell me to figure out the error ? </p>