title: R raster package split image into multiples
body: <p>I have an image as below. It is 2579*2388 pixels. Lets assume that it's bottom left corner is at 0,0. From that image I want to create multiple images as follows and save them in the working folder. Each image will have size of 100*100 pixels. Each image will be saved by it's bottom left hand coordinates.</p>
  
  <ol>
  <li>first image will have its bottom left hand corner at 0,0. Top right
  hand corner will be at 100,100 and the image will be saved as
  0-0.jpg</li>
  <li>second will have its bottom left hand corner at 10,0. Top right hand
  corner will be at 110,100 and the image will be saved as 10-0.jpg</li>
  <li>Once the bottom row is completed, Y coordinate will move by 10. In
  case of second row, the first image will be at 0,10 and that image
  will be saved as 0-10.jpg</li>
  </ol>
  
  <p>what is the fastest way to do this? is there any R package which could do it very fast?</p>
  
  <p>I understand that in the case of the current image, it will split it into around 257*238 images. But I have sufficient disk space and i need each image to perform text detection.</p>
  
  <p><img src="https://i.stack.imgur.com/R1fqE.jpg" alt="enter image description here"></p>