Nesting `if` statements in color parameter for `Rworldmaps`
<p>I am trying to map geo-location data and corresponding scores using <code>rworldmaps</code>. There are three different types of scores, which I would like to represent with different colors. For instance there are positive scores (which I would like to mark with Green), negative scores (which I would like to mark with Red) and data where there was no score (which I would like to mark with yellow).
So far, I am able to correctly plot two scores (positive in green and negative in red), but I am having some difficulty with the third scored.</p>

<p>My code thus far is as follows:</p>

<pre><code>data &lt;- read.csv("/PATH/TO/CSV.csv",header=TRUE)
library(rworldmap)
newmap &lt;- getMap(resolution="low")
plot(newmap,asp=1)
scores(data$Lat, data$Lon, col= ifelse(data[,3] &gt; 0, 'green', 'red'),cex=.6)
</code></pre>

<p>The issue that I am having is in the last line of code beginning with <code>points</code>, I have tried to nest <code>if</code> statements, such as </p>

<pre><code>scores(data$Lat, data$Lon, col= if(data[,3] &gt; 0, 'green'), if(data[,3] &lt; 0, 'red'), if(data[,3] = 0, 'yellow')),cex=.6)
</code></pre>

<p>as well as with nesting <code>ifelse</code> statements, as done <a href="https://stackoverflow.com/questions/18012222/nested-ifelse-statement-in-r">here</a></p>

<pre><code>points(data$Lat, data$Lon, col= ifelse(data[,53] &gt; 0, 'green', ifelse(data[,53]&lt;0 'red', 'yellow')),cex=.6)
</code></pre>

<p>but I have been unsuccessful. Can anyone point me in the direction as to how to correctly nest the <code>if</code> statements, so that I can correctly color the map?
Thank you</p>