R minus sign missing when convert character to numeric by as.numeric
<p>I have large spatial data set in text. i need to convert degree minute.decimal values to decimal degrees. my code as follows. it works well values except 0 to -1. values in 0 to -1 convert to positive values by as.numeric()
Coordinate conversion method is fine, but problem is how to pass minus zero (-0) values in iflese statement. 
how i overcome this problem?</p>

<pre><code>data &lt;- c("-7ø12.2","-1ø23.0","-0ø50.3","0ø14.6","2ø59.7")
# latitudes in degree minutes.decimal format
lat1 &lt;- as.numeric(gsub( "ø.*$", "", data)) # substring befor ø
lat2 &lt;- as.numeric(sub(".*ø", "", data)) # substring after ø
lat &lt;-  ifelse(lat1 &lt; 0, lat1 - lat2 / 60, lat1 +  lat2 / 60) 
</code></pre>

<blockquote>
  <p>lat1
  [1] -7 -1  0  0  2</p>
</blockquote>