Clears the workspace. Useful for the beginnings of R scripts, to
avoid potential problems with accidentally using information from
variables or functions from previous script evaluations, too many
figure windows open at the same time, packages that you don't
need any more, or a cluttered console.
clear all variables and functions in the parent environment?
close all figure windows?
clear the console?
clear all non-base packages? Defaults to FALSE.
Based on StackOverflow contributions from users David Robinson,
shadow, Gavin Simpson, Ramnath, Joshua Ulrich, E Luxo So,
and krlmlr; see