Yet again:Thank you Peter and Duncan. I appreciate your comments and insights.
I agree wholeheartedly with Peter's comments below about understanding
what a parsed expression is in R. In R -- and in functional
programming in general, I believe -- computing on the language is
extremely handy, even
ay, May 20, 2012 4:40 PM
> To: Robert Baer
> Cc: William Dunlap; r-help
> Subject: Re: [R] Names of Greek letters stored as character strings;plotmath.
>
> On 21/05/12 10:53, Robert Baer wrote:
>
>
> >
> >
> >
> > This discussion has been exceedingly
On May 21, 2012, at 05:25 , Duncan Murdoch wrote:
> On 12-05-20 10:28 PM, Bert Gunter wrote:
>> Well, that's not very comforting, Duncan. It's like saying that you
>> have to read the engineering specs to drive the car successfully.
>
> I think Robert's message that I responded to was asking for
shaddup" would therefore not be out of line.
Best,
Bert
On Sun, May 20, 2012 at 5:00 PM, Duncan Murdoch
wrote:
On 12-05-20 6:53 PM, Robert Baer wrote:
-Original Message-
From: William Dunlap
Sent: Saturday, May 19, 2012 11:07 AM
To: Rolf Turner
Cc: r-help
Subject: Re: [R] Name
y)) :
>>> :1:7: unexpected symbol
>>> 1: Waist Size
>>>^
>>>
>>> Now you might say that serves me right for using weird variable names,
>>> but some of us use R as a back end to a GUI system (one not designed
>>> arou
-20 6:53 PM, Robert Baer wrote:
>>
>> -Original Message-
>> From: William Dunlap
>> Sent: Saturday, May 19, 2012 11:07 AM
>> To: Rolf Turner
>> Cc: r-help
>> Subject: Re: [R] Names of Greek letters stored as character
>> strings;plotmath.
>>
On 12-05-20 6:53 PM, Robert Baer wrote:
-Original Message-
From: William Dunlap
Sent: Saturday, May 19, 2012 11:07 AM
To: Rolf Turner
Cc: r-help
Subject: Re: [R] Names of Greek letters stored as character
strings;plotmath.
parse(text=paste(...)) works in simple cases but not in others
On 21/05/12 10:53, Robert Baer wrote:
This discussion has been exceedingly helpful, sort of.
Every time I try to do a task involving this I read the documentation
for bquote(), expression(), plotmath(), etc., over and over, and I
still fail to get the big picture of how R parses things u
-Original Message-
From: William Dunlap
Sent: Saturday, May 19, 2012 11:07 AM
To: Rolf Turner
Cc: r-help
Subject: Re: [R] Names of Greek letters stored as character
strings;plotmath.
parse(text=paste(...)) works in simple cases but not in others. The
fortune about it is there because
Many thanks to Baptiste Auguie (off list), Bill Dunlap, Bert Gunter,
Gabor Grothendieck,
and Paul Johnson for their interesting and informative responses to my post.
The main item to note is that I was piling on unnecessary baggage by using
plot(1:10,xlab= eval(expression(parse(text=xNm))
gt;
> plot(0, main=bquote(.(x)^.(as.vector(power, "symbol"))/.(y)))
>
> I personally think "as.symbol" is more likely to be understood by
> students, I may stick to that. So I think the most succinct, best
> approach is
>
>
> plot(0, main=bquote(.(x
On Sat, May 19, 2012 at 2:16 PM, Paul Johnson wrote:
> On Sat, May 19, 2012 at 11:07 AM, William Dunlap wrote:
>> parse(text=paste(...)) works in simple cases but not in others. The
>> fortune about it is there because it is tempting to use but if you bury it
>> in a general purpose function it
is:
power <- as.symbol("gamma") ; x <- "Waist Size (cm)" ; y <- "Weight (kg)"
plot(0, main=bquote(.(x)^.(power)/.(y)))
Speaking of commands that have identical results and exist separately
for no apparently good reason:
library(help=rockchalk)
help(packag
UI system (one not designed
around R) and don't want to inflict on users R's rules for names when
we do not have to.
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org
..and a final addendum:
xnm <- quote(gamma)
## makes xnm the name gamma not the string "gamma"
plot(0,xlab = bquote( .(xnm))
-- Bert
On Sat, May 19, 2012 at 7:23 AM, Bert Gunter wrote:
> ... and here is another incantation that may be informative.
>
> xnm<- as.name("gamma') ## This does the
... and here is another incantation that may be informative.
xnm<- as.name("gamma') ## This does the parsing
plot(0, xlab =bquote(.(xnm))
The initial puzzle is that if you just set
xnm <- "gamma"
bquote will insert the string "gamma" rather than the symbol. After
all, that's what plotmath sees
On Sat, May 19, 2012 at 1:18 AM, Rolf Turner wrote:
>
> I had such good luck with my previous question to r-help, (a few minutes
> ago) that I thought I would try again with the following query:
>
>> Suppose I have
>>
>> xNm <- "gamma"
>>
>> I would like to be able to do
>>
>> plot(1:10,xlab
17 matches
Mail list logo