The values of two variables a and b are switched in an
environment envir.
Usage
switch_value(a, b, envir = .GlobalEnv)
Arguments
a
the name of the first variable (character)
b
the name of the second variable (character)
envir
the environment of the variables a and b
Value
NULL
Details
This function can make it a little bit easier when a plot can be drawn
vertically and horizontally, in which case we only need to switch some
attributes in the x-axis and y-axis, and the code for actual drawing is not
affected. The bar plot is such an example.