[R] Math expressions in pie chart labels?

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed May 3 18:27:53 CEST 2006


On Wed, 3 May 2006, Johannes Graumann wrote:

> On Wednesday 03 May 2006 09:05, Uwe Ligges wrote:
>> Ah, I see, this happens in pie()'s line:
>>
>>    if (!is.na(lab <- labels[i]) && lab != "") {
>>
>> where lab is one element of the expression.
>> I'd like to propose to change that line to
>>
>>    if (!is.na(lab <- labels[i]) && nchar(lab) > 0) {
>
> What's the canonical way of patching something like this in R? Redefining the
> function at the start of your script?

There are namespace issues, so the canonical way is to change the sources 
and re-build R.  (Anthing which imports the graphics namespace will get 
the system version, not yours.)

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list