Skip to content
Prev 349659 / 398506 Next

Color US counties on US map using a numeric variable for color intensity

Thank you, Jean, but I think this newcol line is not working. I am running:

newcol <- ifelse(missing, "white",

rgb(newpal(mydata.final$Mean.Wait/max(mydata.final$Mean.Wait,
na.rm=T)),
                     maxColorValue=255))

# And I am getting:
Error in rgb(newpal(mydata.final$Mean.Wait/max(mydata.final$Mean.Wait,  :
  color intensity NA, not in 0:255

I think it's not liking the NAs - despite the ifelse...
On Thu, Apr 2, 2015 at 4:26 PM, Adams, Jean <jvadams at usgs.gov> wrote: