title: percent7.4 format in SAS
body: <p>I am working on translating a SAS code to R and since I am new to SAS I am having some trouble understanding data formats in SAS. Also, I don't have access to SAS so i can't try it on a sample data.</p>
  
  <p>My code snippet says -</p>
  
  <pre><code>Data A;
    Set A;
    format Sales_change percent7.4 sales_units comma10.3;
  run;
  </code></pre>
  
  <p>I believe comma10.3 makes the values 'numeric' like the numeric format in excel. i.e. 1000000 becomes 1,000,000. But what does percent7.4 format do? Does it make 0.2364212 as 23.6421% ?
  If so, I have been using the following line in R -</p>
  
  <pre><code>A$Sales_change &lt;- percent(A$Sales_change/1)
  </code></pre>
  
  <p>But this rounds of the numbers to 2 decimal places before reporting the percent values. Can someone tell me if my understanding is right and if right, how to do this in R?</p>