Skip to content
Back to formatted view

Raw Message

Message-ID: <AA4E55C3-34AF-491F-8F22-38F3441A1725@anu.edu.au>
Date: 2005-10-01T10:32:58Z
From: John Maindonald
Subject: Multiple expressions, when using substitute()

expression() accepts multiple expressions as arguments, thus:

plot(1:2, 1:2)
legend("topleft",
               expression(y == a * x^b,
                                    "where "* paste(y=="wood; ",  
x=="dbh")))

Is there a way to do this when values are to be substituted
for a and b? i.e., the first element of the legend argument
to legend() becomes, effectively:
   substitute(y == a * x^b, list(a = B[1], b=B[2]))

John Maindonald             email: john.maindonald at anu.edu.au
phone : +61 2 (6125)3473    fax  : +61 2(6125)5549
Centre for Bioinformation Science, Room 1194,
John Dedman Mathematical Sciences Building (Building 27)
Australian National University, Canberra ACT 0200.