[R] plotmath vector problem; full program enclosed

Paul Johnson pauljohn32 at gmail.com
Wed Jul 7 07:03:59 CEST 2010


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.  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?

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas



More information about the R-help mailing list