Using R 2.14.0 with Windows 7, I want to include italics and a variable in my title using R plot (). Here is the code:
ps=c(1,2,3)
layout(matrix(1:3,1,3))
for(i in 1:3){
plot(1,1,main=expression(paste(italic(p),'=5')))
}
for(i in 1:3){
plot(1,1,main=expression(paste(italic(p),'=',ps[i])))
}
for(i in 1:3){
plot(1,1,main=paste(expression(paste(italic(p),'=')),ps[i]))
}
What I want in the header is p [italics] = ps value during this iteration. For example, for the first iteration, "p = 0.1"
Any help would be greatly appreciated. Thank.
source
share