Hello,
I am using ggplot2 to plot a graph and I want to give a title to the plot that 
has both text and variables. I have tried a couple of ways, but none of the 
methods work. Below is my code. Under ggtitle RR, N, alpha1 are variables and 
"RR(overall), "N", "alpha" are strings.

Require(ggplot2)
data <- do.call(rbind,result)
data.new <- as.data.frame(cbind(data$p1,(data$prob),data$r))
colnames(data.new) <- c("ES","Probability","Vector")
bp<-(ggplot(data.new,aes(x=ES,y=Probability,group=Vector,colour=factor(Vector)))
 + geom_line())
bp.title<- bp+ ggtitle("RR(overall) ="RR, "N" = N, "alpha = "alpha1)
bp.title

Any suggestion on ggplot2 will be much appreciated.

Thanks
Man
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to