title: Write Multiple CSV files in a loop
body: <p>I have a csv file with 1.5 million rows which consists of 2 columns name and email.I want to write a program in such way that when I read my file in R, the output is  segmented of 5000 data in each csv.</p>
  
  <p>Maybe I can do this with a loop: run from row 1 to 5000 and save it as project1.csv and then 5001 to 10000 and save to project2.csv and then 10001 till 15000 in project3.csv in my working directory. Any suggestions?</p>