Re: [R] plotmath: unexpected SPECIAL

2011-06-23 Thread Uwe Ligges
Folks, the relevant thing you have to remember is: All the stuff must be valid R syntax (with few additional functions as mention in the ?plotmath help file). Knowing that it is obvious where additional operators are required. Best, Uwe Ligges On 23.06.2011 02:56, Bryan Hanson wrote:

Re: [R] plotmath: unexpected SPECIAL

2011-06-23 Thread Sarah Goslee
On Thu, Jun 23, 2011 at 6:30 AM, Uwe Ligges lig...@statistik.tu-dortmund.de wrote: Folks, the relevant thing you have to remember is: All the stuff must be valid R syntax (with few additional functions as mention in the ?plotmath help file). Knowing that it is obvious where additional

[R] plotmath: unexpected SPECIAL

2011-06-22 Thread Bryan Hanson
Hello R Masters and the Rest of Us: The first of these works fine, the 2nd is accepted but too literal (the %-% is shown in the plot label and in the wrong position). The 3rd throws and error due to unexpected SPECIAL. Would someone recommend a way to format this? I want the two phrases

Re: [R] plotmath: unexpected SPECIAL

2011-06-22 Thread Sarah Goslee
Interesting. I don't know the explanation, but look at this: # works plot(1:10, 1:10, xlab=expression(a %-% b)) # doesn't work plot(1:10, 1:10, xlab=expression(%-%)) # works plot(1:10, 1:10, xlab=expression(paste(something %-% else))) # doesn't work plot(1:10, 1:10,

Re: [R] plotmath: unexpected SPECIAL

2011-06-22 Thread David Winsemius
On Jun 22, 2011, at 8:10 PM, Bryan Hanson wrote: Hello R Masters and the Rest of Us: The first of these works fine, the 2nd is accepted but too literal (the %-% is shown in the plot label and in the wrong position). The 3rd throws and error due to unexpected SPECIAL. Would someone

Re: [R] plotmath: unexpected SPECIAL

2011-06-22 Thread Bryan Hanson
Thanks to both David and Sarah. I'm glad I asked, as I had tried some of the combos Sarah suggested and observed the same behavior, which puzzled me. David, thanks for reminding me about ~ as that is a different way to get a space into the string. I just don't use plotmath often enough

Re: [R] plotmath: unexpected SPECIAL

2011-06-22 Thread Dennis Murphy
Hi: From the plotmath help page: x %-% y x right-arrow y so this is behaving like a binary operator. There happen to be several of these in plotmath On Wed, Jun 22, 2011 at 5:49 PM, Sarah Goslee sarah.gos...@gmail.com wrote: Interesting. I don't know the explanation, but look at this:

Re: [R] plotmath: unexpected SPECIAL

2011-06-22 Thread Sarah Goslee
Dennis, Thanks. That makes sense, but I don't think it's clearly documented. The default assumption that I and at least some others in this discussion made is that everything in the list of plotmath features in the helpfile works the same way, since they're all in the same list. And if for some