[R] Error in plotmath

Ben Bolker bbolker at gmail.com
Sun Jul 31 21:44:41 CEST 2011


Frank Harrell <f.harrell <at> vanderbilt.edu> writes:

> 
> Under 
> 
> platform       x86_64-pc-linux-gnu          
> arch           x86_64                       
> os             linux-gnu                    
> system         x86_64, linux-gnu            
> status                                      
> 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
> following.
> 
> set.seed(6)
> 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),
>      xlab=expression(x),
>      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
> 

  Works for me on 2.13.0 alpha, 32-bit Linux (OK, I need to update this)
and R-devel.

  Is this in an X11() window or in PDF?  Could it be a PDF font/viewer
problem?

> sessionInfo()
R version 2.13.0 alpha (2011-03-18 r54865)
Platform: i686-pc-linux-gnu (32-bit)

locale:
 [1] LC_CTYPE=en_CA.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_CA.UTF-8        LC_COLLATE=en_CA.UTF-8    
 [5] LC_MONETARY=C              LC_MESSAGES=en_CA.UTF-8   
 [7] LC_PAPER=en_CA.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] grid_2.13.0     lattice_0.19-29 nlme_3.1-101    tools_2.13.0   
============

R Under development (unstable) (2011-07-26 r56507)
Platform: i686-pc-linux-gnu (32-bit)

locale:
 [1] LC_CTYPE=en_CA.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_CA.UTF-8        LC_COLLATE=en_CA.UTF-8    
 [5] LC_MONETARY=en_CA.UTF-8    LC_MESSAGES=en_CA.UTF-8   
 [7] LC_PAPER=C                 LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] grid_2.14.0     lattice_0.19-30 nlme_3.1-102



More information about the R-help mailing list