I'm trying to draw some geom_lines on a ggplot where the color varies according to a boolean test.
According to r - geom_line - different colour in the same line - Stack Overflow the idea seems to be to add a test to the color parameter in aes, but when I put this in the geom_line(), rather than the ggplot() in the example, for instance:
geom_line( data=oneDateData, aes(x=Strike, y=TotalPutsOi/axis2Coeff), size=0, color=(Strike>=minPutItm))
Error in layer(data = data, mapping = mapping, stat = stat, geom = GeomLine, :
object 'Strike' not found