Re: [R] Math expressions in pie chart labels?

From: Johannes Graumann <johannes_graumann_at_web.de>
Date: Thu 04 May 2006 - 02:03:27 EST

Uwe Ligges wrote:

> Johannes Graumann wrote:
> 

>> On Tuesday 02 May 2006 23:33, Uwe Ligges wrote:
>>
>>>Then please read ?plotmath and use it:
>>>
>>>labels = expression("" >= 0.66, "" == 0.33, "" <= -0.33, "" <= -0.66)

>>
>>
>> Error in lab != "" : comparison is not allowed for expressions
>> In addition: Warning message:
>> is.na() applied to non-(list or vector) in: is.na(lab <- labels[i])
>>
>> I don't seem to be the only one having problems with this ;0)
> 
> 
> Then please tell us the details, I just tried successfully:
> 
> plot(1:10, xaxt="n")
> axis(1, at = c(1,3,5,7), labels =
>       expression("" >= 0.66, "" == 0.33, "" <= -0.33, "" <= -0.66))
As I was mentioning in my first post (see subject): this is a pie chart. Try:
pie(
  c(20,40,60,80),
  labels = expression(NULL>= 0.66,NULL>= 0.33,NULL<= -0.33,NULL<= -0.66) )
or the '""' equivalent.
platform       x86_64-pc-linux-gnu
arch           x86_64
os             linux-gnu
system         x86_64, linux-gnu
status
major          2
minor          3.0
year           2006
month          04
day            24
svn rev        37909
language       R

version.string Version 2.3.0 (2006-04-24)

Joh



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu May 04 02:14:50 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 04 May 2006 - 04:09:58 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.