[R] boxplot statistics in ggplot
Vikas Rawal
vikasrawal at gmail.com
Wed Feb 7 12:51:39 CET 2007
How can I superimpose some text labels on ggplot? I could get
weighted quantiles using wtd.quantiles function in Hmisc package. But
I can't plot these as labels on the boxplot.
My code is as follows.
list(c(1:3),c(1:3),c(1:3))->t
library(Hmisc)
for (i in 1:3)
{
wtd.quantile(crop.2.list[[i]]$aggincome,weights=crop.2.list[[i]]$Multiplier,probs=c(0.25,0.5,0.75))->t[[i]]
}
data.frame(y=round(unlist(t)),x=c(1,1,1,2,2,2,3,3,3))->levels
library(ggplot)
ggplot(crop.2.cast,aesthetics=list(x=Tenurial.status,y=aggincome, weight=Multiplier),labels=c("ts","in"))->p
ggtext(ggboxplot(p),aesthetics=list(x=x,y=y,labels=y),data=levels)
I am unable to combine ggtext with ggboxplot. Will be grateful if
someone could help.
Finally, a relatively minor issue at the moment, is it possible to
change the x-axis and y-axis labels?
Vikas
More information about the R-help
mailing list