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

From: Uwe Ligges <ligges_at_statistik.uni-dortmund.de>
Date: Wed 03 May 2006 - 17:03:11 EST

ronggui wrote:

>> Then please read ?plotmath and use it:
>>
>> labels = expression("" >= 0.66, "" == 0.33, "" <= -0.33, "" <= -0.66)

>
>
>
>> pie(1:3,lab="")
>> text(locator(3),lab=expression("">=1,""=2,""<=3))

>
> Error: attempt to use zero-length variable name
>
>> text(locator(3),lab=expression(NULL>=1,NULL=2,NULL<=3))

>
>
> What 's the problem come from?

You are using
  ""=2
which is not syntactically correct (you cannot assign the number 2 into a variable without any name), you should rather use ""==2 (as documented in ?plotmath).

Uwe Ligges

> It seems that NULL>=something is prefered to "">=something,isn't it?
>

>> version

>
> _
> platform i386-pc-mingw32
> arch i386
> os mingw32
> system i386, mingw32
> 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)
>
>> > ______________________________________________
>> > 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
>>
>> ______________________________________________
>> 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
>>

>
>
> --
> ٹ
> Deparment of Sociology
> Fudan University



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 Wed May 03 18:16:56 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 Wed 03 May 2006 - 20:10:00 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.