Re: [R] plotmath vector problem; full program enclosed

2010-07-07 Thread Paul Johnson
On Tue, Jul 6, 2010 at 12:41 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 06/07/2010 10:54 AM, Paul Johnson wrote: Here's another example of my plotmath whipping boy, the Normal distribution. You want as.expression(b1), not expression(b1).  The latter means the expression

Re: [R] plotmath vector problem; full program enclosed

2010-07-07 Thread Allan Engelhardt
On 07/07/10 06:03, Paul Johnson wrote: [...] Hi, Duncan and David Thanks for looking. I suspect from the comment you did not run the code. The expression examples I give do work fine already. But I have to explicitly put in values like 1.96 to make them work. I'm trying to avid that

Re: [R] plotmath vector problem; full program enclosed

2010-07-07 Thread Allan Engelhardt
Ooops, I didn't convert this one to text right for the list. b1- substitute( mu - d*sigma, list(d=*-round(dividers[1],2))* ) should be b1- substitute( mu - d*sigma, list(d=-round(dividers[1],2)) ) and similarly for labels=*as.expression(c(b1,b2,b3,b4,b5))*, padj=-1) read

Re: [R] plotmath vector problem; full program enclosed

2010-07-07 Thread Duncan Murdoch
On 07/07/2010 1:03 AM, Paul Johnson wrote: On Tue, Jul 6, 2010 at 12:41 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 06/07/2010 10:54 AM, Paul Johnson wrote: Here's another example of my plotmath whipping boy, the Normal distribution. You want as.expression(b1), not

Re: [R] plotmath vector problem; full program enclosed

2010-07-07 Thread Paul Johnson
On Wed, Jul 7, 2010 at 5:41 AM, Duncan Murdoch murdoch.dun...@gmail.com wrote: You want as.expression(b1), not expression(b1).  The latter means the expression consisting of the symbol b1.  The former means take the object stored in b1, and convert it to an expression.. Thanks to Duncan

Re: [R] plotmath vector problem; full program enclosed

2010-07-07 Thread Allan Engelhardt
On 07/07/10 18:52, Paul Johnson wrote: [...] 1: axis(1, line=6, at=mu+dividers*sigma, labels=as.expression(c(b1,b2,b3,b4,b5), padj=-1)) 2: axis(1, line=9, at=mu+dividers*sigma, labels=c(as.expression(b1),b2,b3,b4,b5), padj=-1) This second one shouldn't work, I think. It has

[R] plotmath vector problem; full program enclosed

2010-07-06 Thread Paul Johnson
Here's another example of my plotmath whipping boy, the Normal distribution. A colleague asks for a Normal plotted above a series of axes that represent various other distributions (T, etc). I want to use vectors of equations in plotmath to do this, but have run into trouble. Now I've isolated

Re: [R] plotmath vector problem; full program enclosed

2010-07-06 Thread Duncan Murdoch
On 06/07/2010 10:54 AM, Paul Johnson wrote: Here's another example of my plotmath whipping boy, the Normal distribution. A colleague asks for a Normal plotted above a series of axes that represent various other distributions (T, etc). I want to use vectors of equations in plotmath to do this,

Re: [R] plotmath vector problem; full program enclosed

2010-07-06 Thread David Winsemius
On Jul 6, 2010, at 1:41 PM, Duncan Murdoch wrote: On 06/07/2010 10:54 AM, Paul Johnson wrote: Here's another example of my plotmath whipping boy, the Normal distribution. A colleague asks for a Normal plotted above a series of axes that represent various other distributions (T, etc). I

Re: [R] plotmath vector problem; full program enclosed

2010-07-06 Thread Allan Engelhardt
On 06/07/10 18:51, David Winsemius wrote: Easily addressed in this case with ~ instead of -. The value of d provides the minus: b1 - substitute( mu ~ d*sigma, list(d=round(dividers[1],2)) ) Neat trick! But it gives a slightly different minus sign in the display, so perhaps simply b1-

Re: [R] plotmath vector problem; full program enclosed

2010-07-06 Thread Charles C. Berry
On Tue, 6 Jul 2010, David Winsemius wrote: On Jul 6, 2010, at 1:41 PM, Duncan Murdoch wrote: On 06/07/2010 10:54 AM, Paul Johnson wrote: Here's another example of my plotmath whipping boy, the Normal distribution. A colleague asks for a Normal plotted above a series of axes that