#reset everything rm(list = ls()) # clear objects graphics.off() # close graphics windows dev.off() # reset par (and probably some other things)