This function can be called in a code chunk that uses the fig=TRUE option when you change your mind about producing a figure.
fig=TRUE
odfFigureCancel()