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

2006-05-03 Thread Uwe Ligges
Johannes Graumann wrote: ronggui wrote: I think you should use labels = c(= 0.66, = 0.33, = -0.33, = -0.66) . Note the quote in each element of the vector. No. Am using that at the moment. Does not give me the nice plotmath 'greater-than' etc. signs ... Then please read ?plotmath

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

2006-05-03 Thread ronggui
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?

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

2006-05-03 Thread Uwe Ligges
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

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

2006-05-03 Thread Johannes Graumann
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 -

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

2006-05-03 Thread Uwe Ligges
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

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

2006-05-03 Thread Gabor Grothendieck
On 5/3/06, Uwe Ligges [EMAIL PROTECTED] 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

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

2006-05-03 Thread Uwe Ligges
Gabor Grothendieck wrote: On 5/3/06, Uwe Ligges [EMAIL PROTECTED] 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

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

2006-05-03 Thread Johannes Graumann
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:

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

2006-05-03 Thread Johannes Graumann
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

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

2006-05-03 Thread Prof Brian Ripley
Maybe because ?pie says labels: a vector of character strings giving names for the slices. For empty or NA labels, no pointing line is drawn either. Note, nothing about expressions pie() contains if (!is.na(lab - labels[i]) lab != ) { and so it would be easy to

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

2006-05-03 Thread Prof Brian Ripley
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 -

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

2006-05-03 Thread Ben Bolker
Prof Brian Ripley ripley at stats.ox.ac.uk writes: On Wed, 3 May 2006, Johannes Graumann wrote: 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

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

2006-05-03 Thread Gabor Grothendieck
As a workaround you could use pie3D in the plotrix package with height=0 and theta=pi, e.g. library(plotrix) pie3D(1:3, height = 0, theta = pi, labels = expression( = 1, == 2, = 3)) On 5/3/06, Johannes Graumann [EMAIL PROTECTED] wrote: On Wednesday 03 May 2006 09:05, Uwe Ligges wrote:

[R] Math expressions in pie chart labels?

2006-05-02 Thread Johannes Graumann
Hello, trying to get something like this to work and am failing: pie( c(length(strongN14),length(weakN14),length(weakN15),length(strongN15),length(ambiguous)), labels = c(= 0.66, = 0.33, = -0.33, = -0.66), col = c(#FF,#CC,#009900,lightgreen,white) ) Can't figure out a way to display

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

2006-05-02 Thread ronggui
I think you should use labels = c(= 0.66, = 0.33, = -0.33, = -0.66) . Note the quote in each element of the vector. 2006/5/3, Johannes Graumann [EMAIL PROTECTED]: Hello, trying to get something like this to work and am failing: pie(

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

2006-05-02 Thread Johannes Graumann
ronggui wrote: I think you should use labels = c(= 0.66, = 0.33, = -0.33, = -0.66) . Note the quote in each element of the vector. No. Am using that at the moment. Does not give me the nice plotmath 'greater-than' etc. signs ... Joh __