I cant figure out how to plot the difference between two variables, female and male, I want to make a dotplot of female - male.
my attempts so far are:
MyData$earn_diff <- MyData$female - MyData$male
gf_point( ~(female - male), data=MyData)
gf_point( ~(myData$female - myData$male)
both plots resulted in Error: Invalid formula type for gf_point.
The issue is that
ggformula::gf_pointprovides a formula interface forgeom_pointand hence requires both anxand ayaesthetic aka a two sided formula, using1 ~ ...orfactor(1) ~ ...will do: