[R] expression() and plot title
David Winsemius
dwinsemius at comcast.net
Sat Aug 28 07:14:56 CEST 2010
On Aug 28, 2010, at 12:53 AM, Sancar Adali wrote:
> What I want to do is put the arguments I supply to a function into
> the
> title of a plot
> Say I'm calling func.1
> func.1(a=4,b=4)
> plot(....,..., title("a=4, b=4"))
> If I'm calling func.1 with different arguments, I want the plot
> title to
> reflect that.
> A small detail is that func.1 might have an argument with a default
> like
> c=a+b.
Need a code example.
> I tried using expression but couldn't get it to work.
You should be using bquote.
>
> Is there a way to do this using expression() ?
Refer to the answers given earlier today. Subject line:
"How to plot an expression-label with variable text"
--
David.
More information about the R-help
mailing list