This is a helper function to add a caption to the returning image/table.
set.caption(x, permanent = FALSE)
x
string
permanent
(default FALSE) if caption is permanent (for all future tables) or not
FALSE