title: If raster value NA search and extract the nearest non-NA pixel
body: <p>On extracting values of a raster to points I find that I have several <code>NA</code>'s, and rather than use a <code>buffer</code> and <code>fun</code> arguments of <code>extract</code> function, instead I'd like to extract the nearest non-<code>NA</code> Pixel to a point that overlaps <code>NA</code>. </p>
  
  <p>I am using the basic extract function: </p>
  
  <pre><code>data.extr&lt;-extract(loc.thr, data[,11:10])
  </code></pre>