title: Making distinct data.frame with cbind and loop function
body: <p>I’m generating multiple datatable with cbind and loop function.</p>
  
  <p>Let's suppose that I have two data.frame. Each data.frame is 100*10.</p>
  
  <pre><code>first&lt;-data.frame(replicate(10,sample(0:1,100,rep=TRUE)))
  second&lt;-data.frame(replicate(10,sample(2:10,100,rep=TRUE)))
  </code></pre>
  
  <p>The each column of <code>second</code> data.frame is binded with <code>first</code> data.frame, generating ten 100*11 data.frame (first+one column of <code>second</code> data.frame).</p>
  
  <p>So, I created loop function like this.</p>
  
  <pre><code>for (i in 1:10){
  cbind(first,second[,i])}
  </code></pre>
  
  <p>This function has two problems.</p>
  
  <p>First. after running it, nothing happened. Only this syntax appeared in console window.</p>
  
  <pre><code>&gt; for (i in 1:10){
  + ti&lt;-cbind(first,second[,i])}
  </code></pre>
  
  <p>Second, I want to save the outcome in each distinct objects, like <code>t1</code>, <code>t2</code>, <code>t3</code>, ...., <code>t10</code>. So, I ran this code.</p>
  
  <pre><code>for (i in 1:10){
  ti&lt;-cbind(first,second[,i])}
  </code></pre>
  
  <p>However, as you might think, it save the results in '<code>ti</code>' objects repeatedly. So, the <code>ti</code> object is <code>first</code> data frame + 10th column of <code>second</code> data.frame.</p>
  
  <p>How to make 10 distinct objects, like <code>t1</code>, <code>t2</code>, <code>t3</code>, <code>t4</code> ..., <code>t10</code>?</p>
  
  <p>*Additional question : In fact, the <code>second</code> data.frame in real work is more than 100 columns. So, the producted objects are <code>t1</code>, <code>t2</code>, .... <code>t100</code>, .... and continued. Is there a way to save these objects organized?</p>
  
  <p>*Additional question to Akrun's answer</p>
  
  <p>Really thanks to your help. It worked!</p>
  
  <p>However, there is a new problem. What I want to do with results was a bit complicate.</p>
  
  <p>Let's take a example with <code>t1</code> obejct in <code>lst1</code> list. It takes two steps.</p>
  
  <p>I want to excute <code>data.matrix</code> function with <code>t1</code> object, and put the outcome of <code>data.matrix</code> into <code>predict</code> function. (Due to its functional reason, the original function of <code>predict</code> only able to calculate <code>data.matrix</code>)</p>
  
  <p>If it were <code>data.frame</code>, I would ran</p>
  
  <p><code>data.matrix(t1)
  predict(orginalfunction,newx=t1,matrix=TRUE)</code></p>
  
  <p>However, after reading your answer, I think it is right to use <code>lapply</code> with list. <code>data.frame</code> is too messy.</p>
  
  <p>But, how can I apply the <code>data.matrix</code> function to each objects of list and put it into <code>predict</code> function?</p>