In trying to tweak the output of geom_bar(), I come across some solutions that include function(x) as here where the x-axis labels get wrapped by use of stringr:
scale_x_discrete(labels = function(x) str_wrap(x, width = 10)) +
What exactly is function(x) doing? It is simply saying that it's followed by a function to apply to x? But then what's x exactly, since it's the data defined in the original ggplot aes call, while here it's the label text?
Just when I think I understand something in R...
TIA.