In geom_bar() for argument "width=", it is possible to set it with units (like "mm") and not with a percentage of data resolution (the default)?
When I try with this code:
df<-data.frame("x" = rep(c("a","b","c","d"), times = 3),
"y" = c(6,22,10,7,50,68,53,21,44,10,37,72),
"group" = rep(c("gp1","gp2","gp3"),each=4))
ggplot(data = df,aes(x = x, y = y, fill = group))+
geom_bar(aes(x = x, y = y, fill = group),
width = unit(5, "mm"),
stat = "identity")
It returns Error in Ops.unit(width, 2) : operator '/' not meaningful for units