title: Replace initial NA values with zero in a row until non NA column
body: <p>Consider the following row in a dataset:-</p>
  
  <pre><code>#Row (initially):
  NA NA NA NA NA NA NA 2 3 1 4 5 2 NA NA 6 7
  </code></pre>
  
  <p>I want all such rows to be transformed into </p>
  
  <pre><code>#Row  (modified) :
  0  0  0  0  0  0  0 2 3 1 4 5 2 NA NA 6 7
  </code></pre>
  
  <p>Only the initial NA that occur before any non na value shout be replaced by zero and not those that come afterwards.</p>
  
  <p><strong>Edit:</strong> My data is matrix, example:</p>
  
  <pre><code>NA   NA   NA   NA    1    1    1    1    1     1
  NA   NA   NA   NA    1    1    1    1    1     1
  NA   NA   NA   NA    1    1    1    1    1     1
  NA   NA   NA   NA   NA   NA   NA    1   NA     1
  NA   NA   NA   NA   NA   NA   NA    1   NA     1
  NA   NA   NA   NA   NA   NA   NA   NA   NA     1
  1    1    1    1    1    1    1    1   NA     1
  1    1    1    1    1    1    1    1    1     1
  </code></pre>
  
  <p>It should be modified to </p>
  
  <pre><code>0    0    0    0    1    1    1    1    1     1
  0    0    0    0    1    1    1    1    1     1
  0    0    0    0    1    1    1    1    1     1
  0    0    0    0    0    0    0    1   NA     1
  0    0    0    0    0    0    0    1   NA     1
  0    0    0    0    0    0    0    0    0     1
  1    1    1    1    1    1    1    1   NA     1
  1    1    1    1    1    1    1    1    1     1
  </code></pre>