In newer versions of ggplot2 (I tested on 3.3.2, R 4.0.2) using $ in
aes() results in a warning
(https://github.com/tidyverse/ggplot2/issues/2693), specifically,
"Warning: Use of toptable$Sig is discouraged. Use Sig instead." I
changed factor(Sig) to toptable$Sig in the last commit to allow
legendDropLevels to work. Changing this to simply Sig appears to be
the most idiomatic way, the warning is removed and all functionality
appears to be retained.
In newer versions of ggplot2 (I tested on 3.3.2, R 4.0.2) using
$
inaes()
results in a warning (https://github.com/tidyverse/ggplot2/issues/2693), specifically, "Warning: Use oftoptable$Sig
is discouraged. UseSig
instead." I changedfactor(Sig)
totoptable$Sig
in the last commit to allowlegendDropLevels
to work. Changing this to simplySig
appears to be the most idiomatic way, the warning is removed and all functionality appears to be retained.