R - save and replay base plots with recordPlot() and replayPlot()

30 May 2020

To avoid repeating codes, you can save a plot and replay it later:

dev.control(displaylist="enable")
[...]
signifPlot <- recordPlot()
replayPlot(signifPlot) 
[ R  plot  visualization  function  ]