[R] plotmath vector problem; full program enclosed

Duncan Murdoch murdoch.duncan at gmail.com
Wed Jul 7 12:41:11 CEST 2010


On 07/07/2010 1:03 AM, Paul Johnson wrote:
> On Tue, Jul 6, 2010 at 12:41 PM, Duncan Murdoch
> <murdoch.duncan at 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 consisting of the symbol b1".  The former means "take the object
>> stored in b1, and convert it to an expression.".
>>
>> It's not perfect, because you'll end up with "mu - -1.96sigma" (i.e. two
>> minus signs), but it's closer than what you had.
>>
>> Duncan Murdoch
>>
>>     
>
>
> Hi, Duncan and David
>
> Thanks for looking.  I suspect from the comment you did not run the
> code.

And I'm certain from your comment that you didn't run my code, or read 
the explanation carefully.

Duncan Murdoch
>   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 with substitute, which does work for b2, b3, b4,
> b5, all but b1.  Why just one?
>   
> I'm uploading a picture of it so you can see for yourself:
>
> http://pj.freefaculty.org/R/plotmathwrong.pdf
>
> please look in the middle axis.
>
> Why does only b1 not work, but the rest do?
>
>



More information about the R-help mailing list