title: function as an argument of a function in R
body: <p>I have this function which I have saved in the database.</p>
  
  <pre><code>runifrect &lt;- function(n,a,b,z,d) {
  
  
          else(print("Check if the x and y coordinates lie as such: 0&lt;=a&lt;b&lt;=1 and 0&lt;=z&lt;d&lt;=1"))}   
  </code></pre>
  
  <p>Now I am trying to define this function with the use of the old one:</p>
  
  <pre><code>plotrectpoints&lt;- function(runifrect(n,a,b,z,d),a,b,z,d) {
  </code></pre>
  
  <p>However I am getting an error I dont understand what is wrong with the function, I want it to work for any arbitrary values n,a,b,z,d.</p>