title: Stuck in Creating Loop in R
body: <p>I have a transaction data set of 10 customers from 01-01-2013 to 01-11-2016. I split data set for each customer manually as below but I couldn't find how to create a loop to do it. What is the best loop for this?</p>
  
  <p><img src="https://i.stack.imgur.com/6YvdQ.png" alt="This is how my data set looks like for one customer"></p>
  
  <pre><code>customer_1 &lt;- transactions[1:47,]
  customer_2 &lt;- transactions[48:94,]
  customer_3 &lt;- transactions[95:141,]
  customer_4 &lt;- transactions[142:188,]
  customer_5 &lt;- transactions[189:235,]
  customer_6 &lt;- transactions[236:282,]
  customer_7 &lt;- transactions[283:329,]
  customer_8 &lt;- transactions[330:376,]
  customer_9 &lt;- transactions[377:423,]
  customer_10 &lt;- transactions[424:468,]
  </code></pre>