Couldn't find this in a google search, so I thought I'd document it here.
My problem was I needed to change my y-axis labels to basis points, as opposed to standard units, but I couldn't find a way to fix this simple problem, I had my plot like this:
p <- ggplot(plotdat, aes(x = name, y = value, fill = variable)) +
geom_bar(position = "dodge")
but I kept trying to use this line but I kept getting an error.
p + scale_y_continuous(labels = function(x) as.character(x*10000), breaks = 10)
Error in as.vector(x, "character") :
cannot coerce type 'closure' to vector of type 'character'
How can I change the format of my y axis tick labels?