title: zip() function doesn´t work in R Studio: How can I create a compressed file .zip with password?
body: <p>I want to create a compressed file .zip with password in R Studio, but the function zip() from utils doesn´t work. The function doesn´t give me an error message or warning message and It doesn't do anything. I´m trying to compress a .csv file. Below, there is an reproducible example:</p>
  <pre><code>datos &lt;- data.frame(A=1:100, B=1:100, D= rep(&quot;a&quot;,times=100))
                    
  write.csv(datos, file = &quot;datos.csv&quot;)
  
  password &lt;- &quot;hdye89&quot;
                 
  zip(&quot;datos.zip&quot;, &quot;datos.csv&quot;, flags= paste0(&quot;-P&quot;, password))
  </code></pre>
  <p>Here is my session info</p>
  <p><a href="https://i.stack.imgur.com/90ZGx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/90ZGx.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/yBNQm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yBNQm.png" alt="enter image description here" /></a></p>
  <p>I researched and found that I can generate a compressed file with gzip () and it works for me, but I don't know how I can enter the password? Can 7zip.exe be used to do password compression?</p>
  <p>I thank you for your help.</p>