Skip to content
Prev 131568 / 398502 Next

if/else for plot/lines?

The simplest way would be to have a flag, an indicator variable that 
stores a value that indicates if a plot has been done before.  Something 
like this

plot (do my first plot here...)
is.plot=T

.... later in the code...

if (is.plot) {plot (do new plot here)} else {lines(add lines to the 
previous plot)}


Julian
Roger Levy wrote: