title: Compress files from a directory in gzip format (*.gz)
body: <p>I have a directory that contains files with different file extensions and I have to compress them one by one because the 7z program does not allow me to do it massively. for Example:</p>
  <ul>
  <li><p>List item</p>
  </li>
  <li><p>file1.xyz</p>
  </li>
  <li><p>file2.rrr</p>
  </li>
  <li><p>file3.qwe</p>
  </li>
  <li><p>file250.pep</p>
  </li>
  </ul>
  <p>expected output</p>
  <ul>
  <li><p>file1.xyz.gz</p>
  </li>
  <li><p>file2.rrr.gz</p>
  </li>
  <li><p>file3.qwe.gz</p>
  </li>
  <li><p>file250.pep.gz</p>
  </li>
  </ul>
  <p>any idea how to do this in R? thank you</p>