[R] Error in plotmath

Frank Harrell f.harrell at vanderbilt.edu
Sun Jul 31 20:25:06 CEST 2011


platform       x86_64-pc-linux-gnu          
arch           x86_64                       
os             linux-gnu                    
system         x86_64, linux-gnu            
major          2                            
minor          13.1                         
year           2011                         
month          07                           
day            08                           
svn rev        56322                        
language       R                            
version.string R version 2.13.1 (2011-07-08)

I get a double quote mark in place of <= in the y-axis label when I run the

x <- rnorm(30, 100, 20)
xs <- seq(50, 150, length=150)
cdf <- pnorm(xs, 100, 20)
plot(xs, cdf, type='l', ylim=c(0,1),
     ylab=expression(paste("Prob[", X <= x, "]")))
lines(ecdf(x), cex=.5)

The problem also occurs if I use instead ylab=expression(prob(X <= x)))

All is well if I remove "=" but I need <=.


Frank Harrell
Department of Biostatistics, Vanderbilt University
View this message in context: http://r.789695.n4.nabble.com/Error-in-plotmath-tp3708153p3708153.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list